generated-configure.sh revision 1886:f382e4228537
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
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_INTREE_EC
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691STRIP_POLICY
692DEBUG_BINARIES
693ZIP_EXTERNAL_DEBUG_SYMBOLS
694COPY_DEBUG_SYMBOLS
695COMPILE_WITH_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SHARED_LIBRARY_FLAGS
733SET_SHARED_LIBRARY_MAPFILE
734SET_SHARED_LIBRARY_NAME
735SET_SHARED_LIBRARY_ORIGIN
736SET_EXECUTABLE_ORIGIN
737CXX_FLAG_REORDER
738C_FLAG_REORDER
739RC_FLAGS
740AR_OUT_OPTION
741LD_OUT_OPTION
742EXE_OUT_OPTION
743CC_OUT_OPTION
744STRIPFLAGS
745ARFLAGS
746COMPILER_COMMAND_FILE_FLAG
747COMPILER_TARGET_BITS_FLAG
748JT_HOME
749JTREGEXE
750USING_BROKEN_SUSE_LD
751PACKAGE_PATH
752USE_CLANG
753HOTSPOT_LD
754HOTSPOT_CXX
755HOTSPOT_RC
756HOTSPOT_MT
757BUILD_AS
758BUILD_LDCXX
759BUILD_LD
760BUILD_AR
761BUILD_NM
762BUILD_CXX
763BUILD_CC
764BUILD_SYSROOT_LDFLAGS
765BUILD_SYSROOT_CFLAGS
766ac_ct_OBJDUMP
767OBJDUMP
768ac_ct_OBJCOPY
769OBJCOPY
770ac_ct_NM
771ac_ct_STRIP
772GNM
773NM
774STRIP
775MSBUILD
776DUMPBIN
777RC
778MT
779LIPO
780ac_ct_AR
781AR
782AS
783LDCXX
784LD
785CXXCPP
786CPP
787ac_ct_CXX
788CXXFLAGS
789CXX
790ac_ct_PROPER_COMPILER_CXX
791PROPER_COMPILER_CXX
792TOOLCHAIN_PATH_CXX
793POTENTIAL_CXX
794OBJEXT
795EXEEXT
796ac_ct_CC
797CPPFLAGS
798LDFLAGS
799CFLAGS
800CC
801ac_ct_PROPER_COMPILER_CC
802PROPER_COMPILER_CC
803TOOLCHAIN_PATH_CC
804POTENTIAL_CC
805TOOLCHAIN_VERSION
806VS_LIB
807VS_INCLUDE
808VS_PATH
809CYGWIN_LINK
810SYSROOT_LDFLAGS
811SYSROOT_CFLAGS
812LEGACY_EXTRA_LDFLAGS
813LEGACY_EXTRA_CXXFLAGS
814LEGACY_EXTRA_CFLAGS
815EXE_SUFFIX
816OBJ_SUFFIX
817STATIC_LIBRARY
818SHARED_LIBRARY
819STATIC_LIBRARY_SUFFIX
820SHARED_LIBRARY_SUFFIX
821LIBRARY_PREFIX
822TOOLCHAIN_TYPE
823STATIC_BUILD
824BUILD_HOTSPOT
825HOTSPOT_DIST
826BUILD_OUTPUT
827JDK_TOPDIR
828NASHORN_TOPDIR
829HOTSPOT_TOPDIR
830JAXWS_TOPDIR
831JAXP_TOPDIR
832CORBA_TOPDIR
833LANGTOOLS_TOPDIR
834BOOT_JDK_BITS
835JAVAC_FLAGS
836BOOT_JDK_SOURCETARGET
837JARSIGNER
838JAR
839JAVAH
840JAVAC
841JAVA
842BOOT_JDK
843JAVA_CHECK
844JAVAC_CHECK
845VERSION_IS_GA
846VERSION_SHORT
847VERSION_STRING
848VERSION_NUMBER_FOUR_POSITIONS
849VERSION_NUMBER
850VERSION_OPT
851VERSION_BUILD
852VERSION_PRE
853VERSION_PATCH
854VERSION_SECURITY
855VERSION_MINOR
856VERSION_MAJOR
857MACOSX_BUNDLE_ID_BASE
858MACOSX_BUNDLE_NAME_BASE
859COMPANY_NAME
860JDK_RC_PLATFORM_NAME
861PRODUCT_SUFFIX
862PRODUCT_NAME
863LAUNCHER_NAME
864TEST_IN_BUILD
865COPYRIGHT_YEAR
866COMPRESS_JARS
867UNLIMITED_CRYPTO
868CACERTS_FILE
869BUILD_HEADLESS
870SUPPORT_HEADFUL
871SUPPORT_HEADLESS
872DEFAULT_MAKE_TARGET
873OS_VERSION_MICRO
874OS_VERSION_MINOR
875OS_VERSION_MAJOR
876PKG_CONFIG
877BASH_ARGS
878SETFILE
879CODESIGN
880XATTR
881DSYMUTIL
882IS_GNU_TIME
883PATCH
884TIME
885STAT
886HG
887READELF
888OTOOL
889LDD
890ZIP
891UNZIP
892FIND_DELETE
893OUTPUT_SYNC
894OUTPUT_SYNC_SUPPORTED
895CHECK_TOOLSDIR_MAKE
896CHECK_TOOLSDIR_GMAKE
897CHECK_MAKE
898CHECK_GMAKE
899MAKE
900PKGHANDLER
901CONFIGURESUPPORT_OUTPUTDIR
902OUTPUT_ROOT
903CONF_NAME
904SPEC
905SDKROOT
906XCODEBUILD
907BUILD_VARIANT_RELEASE
908DEBUG_CLASSFILES
909FASTDEBUG
910VARIANT
911DEBUG_LEVEL
912MACOSX_UNIVERSAL
913INCLUDE_SA
914JVM_VARIANT_CORE
915JVM_VARIANT_ZEROSHARK
916JVM_VARIANT_ZERO
917JVM_VARIANT_MINIMAL1
918JVM_VARIANT_CLIENT
919JVM_VARIANT_SERVER
920JVM_VARIANTS
921JVM_INTERPRETER
922JDK_VARIANT
923SET_OPENJDK
924CANONICAL_TOPDIR
925ORIGINAL_TOPDIR
926TOPDIR
927PATH_SEP
928ZERO_ARCHDEF
929DEFINE_CROSS_COMPILE_ARCH
930LP64
931OPENJDK_TARGET_OS_EXPORT_DIR
932OPENJDK_TARGET_CPU_JLI_CFLAGS
933OPENJDK_TARGET_CPU_OSARCH
934OPENJDK_TARGET_CPU_ISADIR
935OPENJDK_TARGET_CPU_LIBDIR
936OPENJDK_TARGET_CPU_LEGACY_LIB
937OPENJDK_TARGET_CPU_LEGACY
938REQUIRED_OS_VERSION
939REQUIRED_OS_NAME
940COMPILE_TYPE
941OPENJDK_TARGET_CPU_ENDIAN
942OPENJDK_TARGET_CPU_BITS
943OPENJDK_TARGET_CPU_ARCH
944OPENJDK_TARGET_CPU
945OPENJDK_TARGET_OS_ENV
946OPENJDK_TARGET_OS_TYPE
947OPENJDK_TARGET_OS
948OPENJDK_BUILD_CPU_ENDIAN
949OPENJDK_BUILD_CPU_BITS
950OPENJDK_BUILD_CPU_ARCH
951OPENJDK_BUILD_CPU
952OPENJDK_BUILD_OS_ENV
953OPENJDK_BUILD_OS_TYPE
954OPENJDK_BUILD_OS
955OPENJDK_BUILD_AUTOCONF_NAME
956OPENJDK_TARGET_AUTOCONF_NAME
957target_os
958target_vendor
959target_cpu
960target
961host_os
962host_vendor
963host_cpu
964host
965build_os
966build_vendor
967build_cpu
968build
969NICE
970CPIO
971DF
972READLINK
973CYGPATH
974SED
975FGREP
976EGREP
977GREP
978AWK
979XARGS
980WHICH
981WC
982UNIQ
983UNAME
984TR
985TOUCH
986TEE
987TAR
988TAIL
989SORT
990SH
991RMDIR
992RM
993PRINTF
994NAWK
995MV
996MKTEMP
997MKDIR
998LS
999LN
1000HEAD
1001FIND
1002FILE
1003EXPR
1004ECHO
1005DIRNAME
1006DIFF
1007DATE
1008CUT
1009CP
1010COMM
1011CMP
1012CHMOD
1013CAT
1014BASH
1015BASENAME
1016DATE_WHEN_CONFIGURED
1017ORIGINAL_PATH
1018CONFIGURE_COMMAND_LINE
1019target_alias
1020host_alias
1021build_alias
1022LIBS
1023ECHO_T
1024ECHO_N
1025ECHO_C
1026DEFS
1027mandir
1028localedir
1029libdir
1030psdir
1031pdfdir
1032dvidir
1033htmldir
1034infodir
1035docdir
1036oldincludedir
1037includedir
1038localstatedir
1039sharedstatedir
1040sysconfdir
1041datadir
1042datarootdir
1043libexecdir
1044sbindir
1045bindir
1046program_transform_name
1047prefix
1048exec_prefix
1049PACKAGE_URL
1050PACKAGE_BUGREPORT
1051PACKAGE_STRING
1052PACKAGE_VERSION
1053PACKAGE_TARNAME
1054PACKAGE_NAME
1055PATH_SEPARATOR
1056SHELL'
1057ac_subst_files=''
1058ac_user_opts='
1059enable_option_checking
1060with_target_bits
1061enable_openjdk_only
1062with_custom_make_dir
1063with_jdk_variant
1064with_jvm_interpreter
1065with_jvm_variants
1066enable_debug
1067with_debug_level
1068with_devkit
1069with_sys_root
1070with_sysroot
1071with_tools_dir
1072with_toolchain_path
1073with_extra_path
1074with_sdk_name
1075with_conf_name
1076with_output_sync
1077with_default_make_target
1078enable_headful
1079with_cacerts_file
1080enable_unlimited_crypto
1081with_copyright_year
1082enable_hotspot_test_in_build
1083with_milestone
1084with_update_version
1085with_user_release_suffix
1086with_build_number
1087with_version_string
1088with_version_pre
1089with_version_opt
1090with_version_build
1091with_version_major
1092with_version_minor
1093with_version_security
1094with_version_patch
1095with_boot_jdk
1096with_add_source_root
1097with_override_source_root
1098with_adds_and_overrides
1099with_override_langtools
1100with_override_corba
1101with_override_jaxp
1102with_override_jaxws
1103with_override_hotspot
1104with_override_nashorn
1105with_override_jdk
1106with_import_hotspot
1107enable_static_build
1108with_toolchain_type
1109with_extra_cflags
1110with_extra_cxxflags
1111with_extra_ldflags
1112with_toolchain_version
1113with_build_devkit
1114with_jtreg
1115enable_warnings_as_errors
1116with_native_debug_symbols
1117enable_debug_symbols
1118enable_zip_debug_info
1119enable_native_coverage
1120with_stdc__lib
1121with_msvcr_dll
1122with_msvcp_dll
1123with_x
1124with_cups
1125with_cups_include
1126with_freetype
1127with_freetype_include
1128with_freetype_lib
1129with_freetype_src
1130enable_freetype_bundling
1131with_alsa
1132with_alsa_include
1133with_alsa_lib
1134with_libffi
1135with_libffi_include
1136with_libffi_lib
1137with_libjpeg
1138with_giflib
1139with_libpng
1140with_zlib
1141with_lcms
1142with_dxsdk
1143with_dxsdk_lib
1144with_dxsdk_include
1145with_num_cores
1146with_memory_size
1147with_jobs
1148with_test_jobs
1149with_boot_jdk_jvmargs
1150with_sjavac_server_java
1151enable_sjavac
1152enable_javac_server
1153enable_icecc
1154enable_precompiled_headers
1155enable_ccache
1156with_ccache_dir
1157'
1158      ac_precious_vars='build_alias
1159host_alias
1160target_alias
1161BASENAME
1162BASH
1163CAT
1164CHMOD
1165CMP
1166COMM
1167CP
1168CUT
1169DATE
1170DIFF
1171DIRNAME
1172ECHO
1173EXPR
1174FILE
1175FIND
1176HEAD
1177LN
1178LS
1179MKDIR
1180MKTEMP
1181MV
1182NAWK
1183PRINTF
1184RM
1185RMDIR
1186SH
1187SORT
1188TAIL
1189TAR
1190TEE
1191TOUCH
1192TR
1193UNAME
1194UNIQ
1195WC
1196WHICH
1197XARGS
1198AWK
1199GREP
1200EGREP
1201FGREP
1202SED
1203CYGPATH
1204READLINK
1205DF
1206CPIO
1207NICE
1208MAKE
1209UNZIP
1210ZIP
1211LDD
1212OTOOL
1213READELF
1214HG
1215STAT
1216TIME
1217PATCH
1218DSYMUTIL
1219XATTR
1220CODESIGN
1221SETFILE
1222PKG_CONFIG
1223JAVA
1224JAVAC
1225JAVAH
1226JAR
1227JARSIGNER
1228CC
1229CFLAGS
1230LDFLAGS
1231LIBS
1232CPPFLAGS
1233CXX
1234CXXFLAGS
1235CCC
1236CPP
1237CXXCPP
1238AS
1239AR
1240LIPO
1241STRIP
1242NM
1243GNM
1244OBJCOPY
1245OBJDUMP
1246BUILD_CC
1247BUILD_CXX
1248BUILD_NM
1249BUILD_AR
1250JTREGEXE
1251XMKMF
1252FREETYPE_CFLAGS
1253FREETYPE_LIBS
1254ALSA_CFLAGS
1255ALSA_LIBS
1256LIBFFI_CFLAGS
1257LIBFFI_LIBS
1258PNG_CFLAGS
1259PNG_LIBS
1260LCMS_CFLAGS
1261LCMS_LIBS
1262ICECC_CMD
1263ICECC_CREATE_ENV
1264ICECC_WRAPPER
1265CCACHE'
1266
1267
1268# Initialize some variables set by options.
1269ac_init_help=
1270ac_init_version=false
1271ac_unrecognized_opts=
1272ac_unrecognized_sep=
1273# The variables have the same names as the options, with
1274# dashes changed to underlines.
1275cache_file=/dev/null
1276exec_prefix=NONE
1277no_create=
1278no_recursion=
1279prefix=NONE
1280program_prefix=NONE
1281program_suffix=NONE
1282program_transform_name=s,x,x,
1283silent=
1284site=
1285srcdir=
1286verbose=
1287x_includes=NONE
1288x_libraries=NONE
1289
1290# Installation directory options.
1291# These are left unexpanded so users can "make install exec_prefix=/foo"
1292# and all the variables that are supposed to be based on exec_prefix
1293# by default will actually change.
1294# Use braces instead of parens because sh, perl, etc. also accept them.
1295# (The list follows the same order as the GNU Coding Standards.)
1296bindir='${exec_prefix}/bin'
1297sbindir='${exec_prefix}/sbin'
1298libexecdir='${exec_prefix}/libexec'
1299datarootdir='${prefix}/share'
1300datadir='${datarootdir}'
1301sysconfdir='${prefix}/etc'
1302sharedstatedir='${prefix}/com'
1303localstatedir='${prefix}/var'
1304includedir='${prefix}/include'
1305oldincludedir='/usr/include'
1306docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1307infodir='${datarootdir}/info'
1308htmldir='${docdir}'
1309dvidir='${docdir}'
1310pdfdir='${docdir}'
1311psdir='${docdir}'
1312libdir='${exec_prefix}/lib'
1313localedir='${datarootdir}/locale'
1314mandir='${datarootdir}/man'
1315
1316ac_prev=
1317ac_dashdash=
1318for ac_option
1319do
1320  # If the previous option needs an argument, assign it.
1321  if test -n "$ac_prev"; then
1322    eval $ac_prev=\$ac_option
1323    ac_prev=
1324    continue
1325  fi
1326
1327  case $ac_option in
1328  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1329  *=)   ac_optarg= ;;
1330  *)    ac_optarg=yes ;;
1331  esac
1332
1333  # Accept the important Cygnus configure options, so we can diagnose typos.
1334
1335  case $ac_dashdash$ac_option in
1336  --)
1337    ac_dashdash=yes ;;
1338
1339  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1340    ac_prev=bindir ;;
1341  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1342    bindir=$ac_optarg ;;
1343
1344  -build | --build | --buil | --bui | --bu)
1345    ac_prev=build_alias ;;
1346  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1347    build_alias=$ac_optarg ;;
1348
1349  -cache-file | --cache-file | --cache-fil | --cache-fi \
1350  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1351    ac_prev=cache_file ;;
1352  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1353  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1354    cache_file=$ac_optarg ;;
1355
1356  --config-cache | -C)
1357    cache_file=config.cache ;;
1358
1359  -datadir | --datadir | --datadi | --datad)
1360    ac_prev=datadir ;;
1361  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1362    datadir=$ac_optarg ;;
1363
1364  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1365  | --dataroo | --dataro | --datar)
1366    ac_prev=datarootdir ;;
1367  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1368  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1369    datarootdir=$ac_optarg ;;
1370
1371  -disable-* | --disable-*)
1372    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1373    # Reject names that are not valid shell variable names.
1374    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1375      as_fn_error $? "invalid feature name: $ac_useropt"
1376    ac_useropt_orig=$ac_useropt
1377    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1378    case $ac_user_opts in
1379      *"
1380"enable_$ac_useropt"
1381"*) ;;
1382      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1383	 ac_unrecognized_sep=', ';;
1384    esac
1385    eval enable_$ac_useropt=no ;;
1386
1387  -docdir | --docdir | --docdi | --doc | --do)
1388    ac_prev=docdir ;;
1389  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1390    docdir=$ac_optarg ;;
1391
1392  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1393    ac_prev=dvidir ;;
1394  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1395    dvidir=$ac_optarg ;;
1396
1397  -enable-* | --enable-*)
1398    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1399    # Reject names that are not valid shell variable names.
1400    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1401      as_fn_error $? "invalid feature name: $ac_useropt"
1402    ac_useropt_orig=$ac_useropt
1403    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1404    case $ac_user_opts in
1405      *"
1406"enable_$ac_useropt"
1407"*) ;;
1408      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1409	 ac_unrecognized_sep=', ';;
1410    esac
1411    eval enable_$ac_useropt=\$ac_optarg ;;
1412
1413  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1414  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1415  | --exec | --exe | --ex)
1416    ac_prev=exec_prefix ;;
1417  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1418  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1419  | --exec=* | --exe=* | --ex=*)
1420    exec_prefix=$ac_optarg ;;
1421
1422  -gas | --gas | --ga | --g)
1423    # Obsolete; use --with-gas.
1424    with_gas=yes ;;
1425
1426  -help | --help | --hel | --he | -h)
1427    ac_init_help=long ;;
1428  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1429    ac_init_help=recursive ;;
1430  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1431    ac_init_help=short ;;
1432
1433  -host | --host | --hos | --ho)
1434    ac_prev=host_alias ;;
1435  -host=* | --host=* | --hos=* | --ho=*)
1436    host_alias=$ac_optarg ;;
1437
1438  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1439    ac_prev=htmldir ;;
1440  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1441  | --ht=*)
1442    htmldir=$ac_optarg ;;
1443
1444  -includedir | --includedir | --includedi | --included | --include \
1445  | --includ | --inclu | --incl | --inc)
1446    ac_prev=includedir ;;
1447  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1448  | --includ=* | --inclu=* | --incl=* | --inc=*)
1449    includedir=$ac_optarg ;;
1450
1451  -infodir | --infodir | --infodi | --infod | --info | --inf)
1452    ac_prev=infodir ;;
1453  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1454    infodir=$ac_optarg ;;
1455
1456  -libdir | --libdir | --libdi | --libd)
1457    ac_prev=libdir ;;
1458  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1459    libdir=$ac_optarg ;;
1460
1461  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1462  | --libexe | --libex | --libe)
1463    ac_prev=libexecdir ;;
1464  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1465  | --libexe=* | --libex=* | --libe=*)
1466    libexecdir=$ac_optarg ;;
1467
1468  -localedir | --localedir | --localedi | --localed | --locale)
1469    ac_prev=localedir ;;
1470  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1471    localedir=$ac_optarg ;;
1472
1473  -localstatedir | --localstatedir | --localstatedi | --localstated \
1474  | --localstate | --localstat | --localsta | --localst | --locals)
1475    ac_prev=localstatedir ;;
1476  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1477  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1478    localstatedir=$ac_optarg ;;
1479
1480  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1481    ac_prev=mandir ;;
1482  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1483    mandir=$ac_optarg ;;
1484
1485  -nfp | --nfp | --nf)
1486    # Obsolete; use --without-fp.
1487    with_fp=no ;;
1488
1489  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1490  | --no-cr | --no-c | -n)
1491    no_create=yes ;;
1492
1493  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1494  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1495    no_recursion=yes ;;
1496
1497  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1498  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1499  | --oldin | --oldi | --old | --ol | --o)
1500    ac_prev=oldincludedir ;;
1501  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1502  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1503  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1504    oldincludedir=$ac_optarg ;;
1505
1506  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1507    ac_prev=prefix ;;
1508  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1509    prefix=$ac_optarg ;;
1510
1511  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1512  | --program-pre | --program-pr | --program-p)
1513    ac_prev=program_prefix ;;
1514  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1515  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1516    program_prefix=$ac_optarg ;;
1517
1518  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1519  | --program-suf | --program-su | --program-s)
1520    ac_prev=program_suffix ;;
1521  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1522  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1523    program_suffix=$ac_optarg ;;
1524
1525  -program-transform-name | --program-transform-name \
1526  | --program-transform-nam | --program-transform-na \
1527  | --program-transform-n | --program-transform- \
1528  | --program-transform | --program-transfor \
1529  | --program-transfo | --program-transf \
1530  | --program-trans | --program-tran \
1531  | --progr-tra | --program-tr | --program-t)
1532    ac_prev=program_transform_name ;;
1533  -program-transform-name=* | --program-transform-name=* \
1534  | --program-transform-nam=* | --program-transform-na=* \
1535  | --program-transform-n=* | --program-transform-=* \
1536  | --program-transform=* | --program-transfor=* \
1537  | --program-transfo=* | --program-transf=* \
1538  | --program-trans=* | --program-tran=* \
1539  | --progr-tra=* | --program-tr=* | --program-t=*)
1540    program_transform_name=$ac_optarg ;;
1541
1542  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1543    ac_prev=pdfdir ;;
1544  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1545    pdfdir=$ac_optarg ;;
1546
1547  -psdir | --psdir | --psdi | --psd | --ps)
1548    ac_prev=psdir ;;
1549  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1550    psdir=$ac_optarg ;;
1551
1552  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1553  | -silent | --silent | --silen | --sile | --sil)
1554    silent=yes ;;
1555
1556  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1557    ac_prev=sbindir ;;
1558  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1559  | --sbi=* | --sb=*)
1560    sbindir=$ac_optarg ;;
1561
1562  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1563  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1564  | --sharedst | --shareds | --shared | --share | --shar \
1565  | --sha | --sh)
1566    ac_prev=sharedstatedir ;;
1567  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1568  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1569  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1570  | --sha=* | --sh=*)
1571    sharedstatedir=$ac_optarg ;;
1572
1573  -site | --site | --sit)
1574    ac_prev=site ;;
1575  -site=* | --site=* | --sit=*)
1576    site=$ac_optarg ;;
1577
1578  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1579    ac_prev=srcdir ;;
1580  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1581    srcdir=$ac_optarg ;;
1582
1583  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1584  | --syscon | --sysco | --sysc | --sys | --sy)
1585    ac_prev=sysconfdir ;;
1586  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1587  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1588    sysconfdir=$ac_optarg ;;
1589
1590  -target | --target | --targe | --targ | --tar | --ta | --t)
1591    ac_prev=target_alias ;;
1592  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1593    target_alias=$ac_optarg ;;
1594
1595  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1596    verbose=yes ;;
1597
1598  -version | --version | --versio | --versi | --vers | -V)
1599    ac_init_version=: ;;
1600
1601  -with-* | --with-*)
1602    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1603    # Reject names that are not valid shell variable names.
1604    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1605      as_fn_error $? "invalid package name: $ac_useropt"
1606    ac_useropt_orig=$ac_useropt
1607    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1608    case $ac_user_opts in
1609      *"
1610"with_$ac_useropt"
1611"*) ;;
1612      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1613	 ac_unrecognized_sep=', ';;
1614    esac
1615    eval with_$ac_useropt=\$ac_optarg ;;
1616
1617  -without-* | --without-*)
1618    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1619    # Reject names that are not valid shell variable names.
1620    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1621      as_fn_error $? "invalid package name: $ac_useropt"
1622    ac_useropt_orig=$ac_useropt
1623    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1624    case $ac_user_opts in
1625      *"
1626"with_$ac_useropt"
1627"*) ;;
1628      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1629	 ac_unrecognized_sep=', ';;
1630    esac
1631    eval with_$ac_useropt=no ;;
1632
1633  --x)
1634    # Obsolete; use --with-x.
1635    with_x=yes ;;
1636
1637  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1638  | --x-incl | --x-inc | --x-in | --x-i)
1639    ac_prev=x_includes ;;
1640  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1641  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1642    x_includes=$ac_optarg ;;
1643
1644  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1645  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1646    ac_prev=x_libraries ;;
1647  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1648  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1649    x_libraries=$ac_optarg ;;
1650
1651  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1652Try \`$0 --help' for more information"
1653    ;;
1654
1655  *=*)
1656    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1657    # Reject names that are not valid shell variable names.
1658    case $ac_envvar in #(
1659      '' | [0-9]* | *[!_$as_cr_alnum]* )
1660      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1661    esac
1662    eval $ac_envvar=\$ac_optarg
1663    export $ac_envvar ;;
1664
1665  *)
1666    # FIXME: should be removed in autoconf 3.0.
1667    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1668    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1669      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1670    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1671    ;;
1672
1673  esac
1674done
1675
1676if test -n "$ac_prev"; then
1677  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1678  as_fn_error $? "missing argument to $ac_option"
1679fi
1680
1681if test -n "$ac_unrecognized_opts"; then
1682  case $enable_option_checking in
1683    no) ;;
1684    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1685    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1686  esac
1687fi
1688
1689# Check all directory arguments for consistency.
1690for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1691		datadir sysconfdir sharedstatedir localstatedir includedir \
1692		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1693		libdir localedir mandir
1694do
1695  eval ac_val=\$$ac_var
1696  # Remove trailing slashes.
1697  case $ac_val in
1698    */ )
1699      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1700      eval $ac_var=\$ac_val;;
1701  esac
1702  # Be sure to have absolute directory names.
1703  case $ac_val in
1704    [\\/$]* | ?:[\\/]* )  continue;;
1705    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1706  esac
1707  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1708done
1709
1710# There might be people who depend on the old broken behavior: `$host'
1711# used to hold the argument of --host etc.
1712# FIXME: To remove some day.
1713build=$build_alias
1714host=$host_alias
1715target=$target_alias
1716
1717# FIXME: To remove some day.
1718if test "x$host_alias" != x; then
1719  if test "x$build_alias" = x; then
1720    cross_compiling=maybe
1721  elif test "x$build_alias" != "x$host_alias"; then
1722    cross_compiling=yes
1723  fi
1724fi
1725
1726ac_tool_prefix=
1727test -n "$host_alias" && ac_tool_prefix=$host_alias-
1728
1729test "$silent" = yes && exec 6>/dev/null
1730
1731
1732ac_pwd=`pwd` && test -n "$ac_pwd" &&
1733ac_ls_di=`ls -di .` &&
1734ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1735  as_fn_error $? "working directory cannot be determined"
1736test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1737  as_fn_error $? "pwd does not report name of working directory"
1738
1739
1740# Find the source files, if location was not specified.
1741if test -z "$srcdir"; then
1742  ac_srcdir_defaulted=yes
1743  # Try the directory containing this script, then the parent directory.
1744  ac_confdir=`$as_dirname -- "$as_myself" ||
1745$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1746	 X"$as_myself" : 'X\(//\)[^/]' \| \
1747	 X"$as_myself" : 'X\(//\)$' \| \
1748	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1749$as_echo X"$as_myself" |
1750    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\/\)[^/].*/{
1755	    s//\1/
1756	    q
1757	  }
1758	  /^X\(\/\/\)$/{
1759	    s//\1/
1760	    q
1761	  }
1762	  /^X\(\/\).*/{
1763	    s//\1/
1764	    q
1765	  }
1766	  s/.*/./; q'`
1767  srcdir=$ac_confdir
1768  if test ! -r "$srcdir/$ac_unique_file"; then
1769    srcdir=..
1770  fi
1771else
1772  ac_srcdir_defaulted=no
1773fi
1774if test ! -r "$srcdir/$ac_unique_file"; then
1775  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1776  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1777fi
1778ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1779ac_abs_confdir=`(
1780	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1781	pwd)`
1782# When building in place, set srcdir=.
1783if test "$ac_abs_confdir" = "$ac_pwd"; then
1784  srcdir=.
1785fi
1786# Remove unnecessary trailing slashes from srcdir.
1787# Double slashes in file names in object file debugging info
1788# mess up M-x gdb in Emacs.
1789case $srcdir in
1790*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1791esac
1792for ac_var in $ac_precious_vars; do
1793  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1794  eval ac_env_${ac_var}_value=\$${ac_var}
1795  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1796  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1797done
1798
1799#
1800# Report the --help message.
1801#
1802if test "$ac_init_help" = "long"; then
1803  # Omit some internal or obsolete options to make the list less imposing.
1804  # This message is too long to be a string in the A/UX 3.1 sh.
1805  cat <<_ACEOF
1806\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1807
1808Usage: $0 [OPTION]... [VAR=VALUE]...
1809
1810To assign environment variables (e.g., CC, CFLAGS...), specify them as
1811VAR=VALUE.  See below for descriptions of some of the useful variables.
1812
1813Defaults for the options are specified in brackets.
1814
1815Configuration:
1816  -h, --help              display this help and exit
1817      --help=short        display options specific to this package
1818      --help=recursive    display the short help of all the included packages
1819  -V, --version           display version information and exit
1820  -q, --quiet, --silent   do not print \`checking ...' messages
1821      --cache-file=FILE   cache test results in FILE [disabled]
1822  -C, --config-cache      alias for \`--cache-file=config.cache'
1823  -n, --no-create         do not create output files
1824      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1825
1826Installation directories:
1827  --prefix=PREFIX         install architecture-independent files in PREFIX
1828                          [$ac_default_prefix]
1829  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1830                          [PREFIX]
1831
1832By default, \`make install' will install all the files in
1833\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1834an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1835for instance \`--prefix=\$HOME'.
1836
1837For better control, use the options below.
1838
1839Fine tuning of the installation directories:
1840  --bindir=DIR            user executables [EPREFIX/bin]
1841  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1842  --libexecdir=DIR        program executables [EPREFIX/libexec]
1843  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1844  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1845  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1846  --libdir=DIR            object code libraries [EPREFIX/lib]
1847  --includedir=DIR        C header files [PREFIX/include]
1848  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1849  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1850  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1851  --infodir=DIR           info documentation [DATAROOTDIR/info]
1852  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1853  --mandir=DIR            man documentation [DATAROOTDIR/man]
1854  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1855  --htmldir=DIR           html documentation [DOCDIR]
1856  --dvidir=DIR            dvi documentation [DOCDIR]
1857  --pdfdir=DIR            pdf documentation [DOCDIR]
1858  --psdir=DIR             ps documentation [DOCDIR]
1859_ACEOF
1860
1861  cat <<\_ACEOF
1862
1863X features:
1864  --x-includes=DIR    X include files are in DIR
1865  --x-libraries=DIR   X library files are in DIR
1866
1867System types:
1868  --build=BUILD     configure for building on BUILD [guessed]
1869  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1870  --target=TARGET   configure for building compilers for TARGET [HOST]
1871_ACEOF
1872fi
1873
1874if test -n "$ac_init_help"; then
1875  case $ac_init_help in
1876     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1877   esac
1878  cat <<\_ACEOF
1879
1880Optional Features:
1881  --disable-option-checking  ignore unrecognized --enable/--with options
1882  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1883  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1884  --enable-openjdk-only   suppress building custom source even if present
1885                          [disabled]
1886  --enable-debug          set the debug level to fastdebug (shorthand for
1887                          --with-debug-level=fastdebug) [disabled]
1888  --disable-headful       disable building headful support (graphical UI
1889                          support) [enabled]
1890  --enable-unlimited-crypto
1891                          Enable unlimited crypto policy [disabled]
1892  --enable-hotspot-test-in-build
1893                          run the Queens test after Hotspot build [disabled]
1894  --enable-static-build   enable static library build [disabled]
1895  --disable-warnings-as-errors
1896                          do not consider native warnings to be an error
1897                          [enabled]
1898  --enable-debug-symbols  Deprecated. Option is kept for backwards
1899                          compatibility and is ignored
1900  --enable-zip-debug-info Deprecated. Option is kept for backwards
1901                          compatibility and is ignored
1902  --enable-native-coverage
1903                          enable native compilation with code coverage
1904                          data[disabled]
1905  --disable-freetype-bundling
1906                          disable bundling of the freetype library with the
1907                          build result [enabled on Windows or when using
1908                          --with-freetype, disabled otherwise]
1909  --enable-sjavac         use sjavac to do fast incremental compiles
1910                          [disabled]
1911  --disable-javac-server  disable javac server [enabled]
1912  --enable-icecc          enable distribted compilation of native code using
1913                          icecc/icecream [disabled]
1914  --disable-precompiled-headers
1915                          disable using precompiled headers when compiling C++
1916                          [enabled]
1917  --enable-ccache         enable using ccache to speed up recompilations
1918                          [disabled]
1919
1920Optional Packages:
1921  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1922  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1923  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1924                          support it), e.g. --with-target-bits=32 [guessed]
1925  --with-custom-make-dir  Deprecated. Option is kept for backwards
1926                          compatibility and is ignored
1927  --with-jdk-variant      JDK variant to build (normal) [normal]
1928  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1929  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1930                          client, minimal1, zero, zeroshark, core) [server]
1931  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1932                          optimized (HotSpot build only)) [release]
1933  --with-devkit           use this devkit for compilers, tools and resources
1934  --with-sys-root         alias for --with-sysroot for backwards compatability
1935  --with-sysroot          use this directory as sysroot
1936  --with-tools-dir        alias for --with-toolchain-path for backwards
1937                          compatibility
1938  --with-toolchain-path   prepend these directories when searching for
1939                          toolchain binaries (compilers etc)
1940  --with-extra-path       prepend these directories to the default path
1941  --with-sdk-name         use the platform SDK of the given name. [macosx]
1942  --with-conf-name        use this as the name of the configuration [generated
1943                          from important configuration options]
1944  --with-output-sync      set make output sync type if supported by make.
1945                          [recurse]
1946  --with-default-make-target
1947                          set the default make target [exploded-image]
1948  --with-cacerts-file     specify alternative cacerts file
1949  --with-copyright-year   Set copyright year value for build [current year]
1950  --with-milestone        Deprecated. Option is kept for backwards
1951                          compatibility and is ignored
1952  --with-update-version   Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-user-release-suffix
1955                          Deprecated. Option is kept for backwards
1956                          compatibility and is ignored
1957  --with-build-number     Deprecated. Option is kept for backwards
1958                          compatibility and is ignored
1959  --with-version-string   Set version string [calculated]
1960  --with-version-pre      Set the base part of the version 'PRE' field
1961                          (pre-release identifier) ['internal']
1962  --with-version-opt      Set version 'OPT' field (build metadata)
1963                          [<timestamp>.<user>.<dirname>]
1964  --with-version-build    Set version 'BUILD' field (build number) [not
1965                          specified]
1966  --with-version-major    Set version 'MAJOR' field (first number) [current
1967                          source value]
1968  --with-version-minor    Set version 'MINOR' field (second number) [current
1969                          source value]
1970  --with-version-security Set version 'SECURITY' field (third number) [current
1971                          source value]
1972  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1973                          specified]
1974  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1975  --with-add-source-root  Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-override-source-root
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-adds-and-overrides
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-langtools
1984                          Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-override-corba   Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-override-jaxp    Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-override-jaxws   Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-override-hotspot Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-override-nashorn Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-override-jdk     Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-import-hotspot   import hotspot binaries from this jdk image or
1999                          hotspot build dist dir instead of building from
2000                          source
2001  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2002                          to show possible values [platform dependent]
2003  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2004  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2005  --with-extra-ldflags    extra flags to be used when linking jdk
2006  --with-toolchain-version
2007                          the version of the toolchain to look for, use
2008                          '--help' to show possible values [platform
2009                          dependent]
2010  --with-build-devkit     Devkit to use for the build platform toolchain
2011  --with-jtreg            Regression Test Harness [probed]
2012  --with-native-debug-symbols
2013                          set the native debug symbol configuration (none,
2014                          internal, external, zipped) [zipped]
2015  --with-stdc++lib=<static>,<dynamic>,<default>
2016                          force linking of the C++ runtime on Linux to either
2017                          static or dynamic, default is static with dynamic as
2018                          fallback
2019  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2020                          (Windows only) [probed]
2021  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2022                          (Windows only) [probed]
2023  --with-x                use the X Window System
2024  --with-cups             specify prefix directory for the cups package
2025                          (expecting the headers under PATH/include)
2026  --with-cups-include     specify directory for the cups include files
2027  --with-freetype         specify prefix directory for the freetype package
2028                          (expecting the libraries under PATH/lib and the
2029                          headers under PATH/include)
2030  --with-freetype-include specify directory for the freetype include files
2031  --with-freetype-lib     specify directory for the freetype library
2032  --with-freetype-src     specify directory with freetype sources to
2033                          automatically build the library (experimental,
2034                          Windows-only)
2035  --with-alsa             specify prefix directory for the alsa package
2036                          (expecting the libraries under PATH/lib and the
2037                          headers under PATH/include)
2038  --with-alsa-include     specify directory for the alsa include files
2039  --with-alsa-lib         specify directory for the alsa library
2040  --with-libffi           specify prefix directory for the libffi package
2041                          (expecting the libraries under PATH/lib and the
2042                          headers under PATH/include)
2043  --with-libffi-include   specify directory for the libffi include files
2044  --with-libffi-lib       specify directory for the libffi library
2045  --with-libjpeg          use libjpeg from build system or OpenJDK source
2046                          (system, bundled) [bundled]
2047  --with-giflib           use giflib from build system or OpenJDK source
2048                          (system, bundled) [bundled]
2049  --with-libpng           use libpng from build system or OpenJDK source
2050                          (system, bundled) [bundled]
2051  --with-zlib             use zlib from build system or OpenJDK source
2052                          (system, bundled) [bundled]
2053  --with-lcms             use lcms2 from build system or OpenJDK source
2054                          (system, bundled) [bundled]
2055  --with-dxsdk            Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-dxsdk-include    Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-num-cores        number of cores in the build system, e.g.
2062                          --with-num-cores=8 [probed]
2063  --with-memory-size      memory (in MB) available in the build system, e.g.
2064                          --with-memory-size=1024 [probed]
2065  --with-jobs             number of parallel jobs to let make run [calculated
2066                          based on cores and memory]
2067  --with-test-jobs        number of parallel tests jobs to run [based on build
2068                          jobs]
2069  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2070                          invocations of boot JDK, overriding the default
2071                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2072                          -enableassertions"
2073  --with-sjavac-server-java
2074                          use this java binary for running the sjavac
2075                          background server [Boot JDK java]
2076  --with-ccache-dir       where to store ccache files [~/.ccache]
2077
2078Some influential environment variables:
2079  BASENAME    Override default value for BASENAME
2080  BASH        Override default value for BASH
2081  CAT         Override default value for CAT
2082  CHMOD       Override default value for CHMOD
2083  CMP         Override default value for CMP
2084  COMM        Override default value for COMM
2085  CP          Override default value for CP
2086  CUT         Override default value for CUT
2087  DATE        Override default value for DATE
2088  DIFF        Override default value for DIFF
2089  DIRNAME     Override default value for DIRNAME
2090  ECHO        Override default value for ECHO
2091  EXPR        Override default value for EXPR
2092  FILE        Override default value for FILE
2093  FIND        Override default value for FIND
2094  HEAD        Override default value for HEAD
2095  LN          Override default value for LN
2096  LS          Override default value for LS
2097  MKDIR       Override default value for MKDIR
2098  MKTEMP      Override default value for MKTEMP
2099  MV          Override default value for MV
2100  NAWK        Override default value for NAWK
2101  PRINTF      Override default value for PRINTF
2102  RM          Override default value for RM
2103  RMDIR       Override default value for RMDIR
2104  SH          Override default value for SH
2105  SORT        Override default value for SORT
2106  TAIL        Override default value for TAIL
2107  TAR         Override default value for TAR
2108  TEE         Override default value for TEE
2109  TOUCH       Override default value for TOUCH
2110  TR          Override default value for TR
2111  UNAME       Override default value for UNAME
2112  UNIQ        Override default value for UNIQ
2113  WC          Override default value for WC
2114  WHICH       Override default value for WHICH
2115  XARGS       Override default value for XARGS
2116  AWK         Override default value for AWK
2117  GREP        Override default value for GREP
2118  EGREP       Override default value for EGREP
2119  FGREP       Override default value for FGREP
2120  SED         Override default value for SED
2121  CYGPATH     Override default value for CYGPATH
2122  READLINK    Override default value for READLINK
2123  DF          Override default value for DF
2124  CPIO        Override default value for CPIO
2125  NICE        Override default value for NICE
2126  MAKE        Override default value for MAKE
2127  UNZIP       Override default value for UNZIP
2128  ZIP         Override default value for ZIP
2129  LDD         Override default value for LDD
2130  OTOOL       Override default value for OTOOL
2131  READELF     Override default value for READELF
2132  HG          Override default value for HG
2133  STAT        Override default value for STAT
2134  TIME        Override default value for TIME
2135  PATCH       Override default value for PATCH
2136  DSYMUTIL    Override default value for DSYMUTIL
2137  XATTR       Override default value for XATTR
2138  CODESIGN    Override default value for CODESIGN
2139  SETFILE     Override default value for SETFILE
2140  PKG_CONFIG  path to pkg-config utility
2141  JAVA        Override default value for JAVA
2142  JAVAC       Override default value for JAVAC
2143  JAVAH       Override default value for JAVAH
2144  JAR         Override default value for JAR
2145  JARSIGNER   Override default value for JARSIGNER
2146  CC          C compiler command
2147  CFLAGS      C compiler flags
2148  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2149              nonstandard directory <lib dir>
2150  LIBS        libraries to pass to the linker, e.g. -l<library>
2151  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2152              you have headers in a nonstandard directory <include dir>
2153  CXX         C++ compiler command
2154  CXXFLAGS    C++ compiler flags
2155  CPP         C preprocessor
2156  CXXCPP      C++ preprocessor
2157  AS          Override default value for AS
2158  AR          Override default value for AR
2159  LIPO        Override default value for LIPO
2160  STRIP       Override default value for STRIP
2161  NM          Override default value for NM
2162  GNM         Override default value for GNM
2163  OBJCOPY     Override default value for OBJCOPY
2164  OBJDUMP     Override default value for OBJDUMP
2165  BUILD_CC    Override default value for BUILD_CC
2166  BUILD_CXX   Override default value for BUILD_CXX
2167  BUILD_NM    Override default value for BUILD_NM
2168  BUILD_AR    Override default value for BUILD_AR
2169  JTREGEXE    Override default value for JTREGEXE
2170  XMKMF       Path to xmkmf, Makefile generator for X Window System
2171  FREETYPE_CFLAGS
2172              C compiler flags for FREETYPE, overriding pkg-config
2173  FREETYPE_LIBS
2174              linker flags for FREETYPE, overriding pkg-config
2175  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2176  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2177  LIBFFI_CFLAGS
2178              C compiler flags for LIBFFI, overriding pkg-config
2179  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2180  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2181  PNG_LIBS    linker flags for PNG, overriding pkg-config
2182  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2183  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2184  ICECC_CMD   Override default value for ICECC_CMD
2185  ICECC_CREATE_ENV
2186              Override default value for ICECC_CREATE_ENV
2187  ICECC_WRAPPER
2188              Override default value for ICECC_WRAPPER
2189  CCACHE      Override default value for CCACHE
2190
2191Use these variables to override the choices made by `configure' or to help
2192it to find libraries and programs with nonstandard names/locations.
2193
2194Report bugs to <build-dev@openjdk.java.net>.
2195OpenJDK home page: <http://openjdk.java.net>.
2196_ACEOF
2197ac_status=$?
2198fi
2199
2200if test "$ac_init_help" = "recursive"; then
2201  # If there are subdirs, report their specific --help.
2202  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2203    test -d "$ac_dir" ||
2204      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2205      continue
2206    ac_builddir=.
2207
2208case "$ac_dir" in
2209.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2210*)
2211  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2212  # A ".." for each directory in $ac_dir_suffix.
2213  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2214  case $ac_top_builddir_sub in
2215  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2216  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2217  esac ;;
2218esac
2219ac_abs_top_builddir=$ac_pwd
2220ac_abs_builddir=$ac_pwd$ac_dir_suffix
2221# for backward compatibility:
2222ac_top_builddir=$ac_top_build_prefix
2223
2224case $srcdir in
2225  .)  # We are building in place.
2226    ac_srcdir=.
2227    ac_top_srcdir=$ac_top_builddir_sub
2228    ac_abs_top_srcdir=$ac_pwd ;;
2229  [\\/]* | ?:[\\/]* )  # Absolute name.
2230    ac_srcdir=$srcdir$ac_dir_suffix;
2231    ac_top_srcdir=$srcdir
2232    ac_abs_top_srcdir=$srcdir ;;
2233  *) # Relative name.
2234    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2235    ac_top_srcdir=$ac_top_build_prefix$srcdir
2236    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2237esac
2238ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2239
2240    cd "$ac_dir" || { ac_status=$?; continue; }
2241    # Check for guested configure.
2242    if test -f "$ac_srcdir/configure.gnu"; then
2243      echo &&
2244      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2245    elif test -f "$ac_srcdir/configure"; then
2246      echo &&
2247      $SHELL "$ac_srcdir/configure" --help=recursive
2248    else
2249      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2250    fi || ac_status=$?
2251    cd "$ac_pwd" || { ac_status=$?; break; }
2252  done
2253fi
2254
2255test -n "$ac_init_help" && exit $ac_status
2256if $ac_init_version; then
2257  cat <<\_ACEOF
2258OpenJDK configure jdk9
2259generated by GNU Autoconf 2.69
2260
2261Copyright (C) 2012 Free Software Foundation, Inc.
2262This configure script is free software; the Free Software Foundation
2263gives unlimited permission to copy, distribute and modify it.
2264_ACEOF
2265  exit
2266fi
2267
2268## ------------------------ ##
2269## Autoconf initialization. ##
2270## ------------------------ ##
2271
2272# ac_fn_c_try_compile LINENO
2273# --------------------------
2274# Try to compile conftest.$ac_ext, and return whether this succeeded.
2275ac_fn_c_try_compile ()
2276{
2277  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2278  rm -f conftest.$ac_objext
2279  if { { ac_try="$ac_compile"
2280case "(($ac_try" in
2281  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2282  *) ac_try_echo=$ac_try;;
2283esac
2284eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2285$as_echo "$ac_try_echo"; } >&5
2286  (eval "$ac_compile") 2>conftest.err
2287  ac_status=$?
2288  if test -s conftest.err; then
2289    grep -v '^ *+' conftest.err >conftest.er1
2290    cat conftest.er1 >&5
2291    mv -f conftest.er1 conftest.err
2292  fi
2293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2294  test $ac_status = 0; } && {
2295	 test -z "$ac_c_werror_flag" ||
2296	 test ! -s conftest.err
2297       } && test -s conftest.$ac_objext; then :
2298  ac_retval=0
2299else
2300  $as_echo "$as_me: failed program was:" >&5
2301sed 's/^/| /' conftest.$ac_ext >&5
2302
2303	ac_retval=1
2304fi
2305  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306  as_fn_set_status $ac_retval
2307
2308} # ac_fn_c_try_compile
2309
2310# ac_fn_cxx_try_compile LINENO
2311# ----------------------------
2312# Try to compile conftest.$ac_ext, and return whether this succeeded.
2313ac_fn_cxx_try_compile ()
2314{
2315  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2316  rm -f conftest.$ac_objext
2317  if { { ac_try="$ac_compile"
2318case "(($ac_try" in
2319  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2320  *) ac_try_echo=$ac_try;;
2321esac
2322eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2323$as_echo "$ac_try_echo"; } >&5
2324  (eval "$ac_compile") 2>conftest.err
2325  ac_status=$?
2326  if test -s conftest.err; then
2327    grep -v '^ *+' conftest.err >conftest.er1
2328    cat conftest.er1 >&5
2329    mv -f conftest.er1 conftest.err
2330  fi
2331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2332  test $ac_status = 0; } && {
2333	 test -z "$ac_cxx_werror_flag" ||
2334	 test ! -s conftest.err
2335       } && test -s conftest.$ac_objext; then :
2336  ac_retval=0
2337else
2338  $as_echo "$as_me: failed program was:" >&5
2339sed 's/^/| /' conftest.$ac_ext >&5
2340
2341	ac_retval=1
2342fi
2343  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2344  as_fn_set_status $ac_retval
2345
2346} # ac_fn_cxx_try_compile
2347
2348# ac_fn_c_try_cpp LINENO
2349# ----------------------
2350# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2351ac_fn_c_try_cpp ()
2352{
2353  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2354  if { { ac_try="$ac_cpp conftest.$ac_ext"
2355case "(($ac_try" in
2356  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2357  *) ac_try_echo=$ac_try;;
2358esac
2359eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2360$as_echo "$ac_try_echo"; } >&5
2361  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2362  ac_status=$?
2363  if test -s conftest.err; then
2364    grep -v '^ *+' conftest.err >conftest.er1
2365    cat conftest.er1 >&5
2366    mv -f conftest.er1 conftest.err
2367  fi
2368  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2369  test $ac_status = 0; } > conftest.i && {
2370	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2371	 test ! -s conftest.err
2372       }; then :
2373  ac_retval=0
2374else
2375  $as_echo "$as_me: failed program was:" >&5
2376sed 's/^/| /' conftest.$ac_ext >&5
2377
2378    ac_retval=1
2379fi
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_cpp
2384
2385# ac_fn_cxx_try_cpp LINENO
2386# ------------------------
2387# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2388ac_fn_cxx_try_cpp ()
2389{
2390  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2391  if { { ac_try="$ac_cpp conftest.$ac_ext"
2392case "(($ac_try" in
2393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2394  *) ac_try_echo=$ac_try;;
2395esac
2396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2397$as_echo "$ac_try_echo"; } >&5
2398  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2399  ac_status=$?
2400  if test -s conftest.err; then
2401    grep -v '^ *+' conftest.err >conftest.er1
2402    cat conftest.er1 >&5
2403    mv -f conftest.er1 conftest.err
2404  fi
2405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2406  test $ac_status = 0; } > conftest.i && {
2407	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2408	 test ! -s conftest.err
2409       }; then :
2410  ac_retval=0
2411else
2412  $as_echo "$as_me: failed program was:" >&5
2413sed 's/^/| /' conftest.$ac_ext >&5
2414
2415    ac_retval=1
2416fi
2417  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2418  as_fn_set_status $ac_retval
2419
2420} # ac_fn_cxx_try_cpp
2421
2422# ac_fn_c_try_link LINENO
2423# -----------------------
2424# Try to link conftest.$ac_ext, and return whether this succeeded.
2425ac_fn_c_try_link ()
2426{
2427  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428  rm -f conftest.$ac_objext conftest$ac_exeext
2429  if { { ac_try="$ac_link"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_link") 2>conftest.err
2437  ac_status=$?
2438  if test -s conftest.err; then
2439    grep -v '^ *+' conftest.err >conftest.er1
2440    cat conftest.er1 >&5
2441    mv -f conftest.er1 conftest.err
2442  fi
2443  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2444  test $ac_status = 0; } && {
2445	 test -z "$ac_c_werror_flag" ||
2446	 test ! -s conftest.err
2447       } && test -s conftest$ac_exeext && {
2448	 test "$cross_compiling" = yes ||
2449	 test -x conftest$ac_exeext
2450       }; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2459  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2460  # interfere with the next link command; also delete a directory that is
2461  # left behind by Apple's compiler.  We do this before executing the actions.
2462  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2463  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464  as_fn_set_status $ac_retval
2465
2466} # ac_fn_c_try_link
2467
2468# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2469# ---------------------------------------------------------
2470# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2471# the include files in INCLUDES and setting the cache variable VAR
2472# accordingly.
2473ac_fn_cxx_check_header_mongrel ()
2474{
2475  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2476  if eval \${$3+:} false; then :
2477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2478$as_echo_n "checking for $2... " >&6; }
2479if eval \${$3+:} false; then :
2480  $as_echo_n "(cached) " >&6
2481fi
2482eval ac_res=\$$3
2483	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2484$as_echo "$ac_res" >&6; }
2485else
2486  # Is the header compilable?
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2488$as_echo_n "checking $2 usability... " >&6; }
2489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490/* end confdefs.h.  */
2491$4
2492#include <$2>
2493_ACEOF
2494if ac_fn_cxx_try_compile "$LINENO"; then :
2495  ac_header_compiler=yes
2496else
2497  ac_header_compiler=no
2498fi
2499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2501$as_echo "$ac_header_compiler" >&6; }
2502
2503# Is the header present?
2504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2505$as_echo_n "checking $2 presence... " >&6; }
2506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2507/* end confdefs.h.  */
2508#include <$2>
2509_ACEOF
2510if ac_fn_cxx_try_cpp "$LINENO"; then :
2511  ac_header_preproc=yes
2512else
2513  ac_header_preproc=no
2514fi
2515rm -f conftest.err conftest.i conftest.$ac_ext
2516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2517$as_echo "$ac_header_preproc" >&6; }
2518
2519# So?  What about this header?
2520case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2521  yes:no: )
2522    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2523$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2525$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2526    ;;
2527  no:yes:* )
2528    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2529$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2531$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2532    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2533$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2534    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2535$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2537$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2538( $as_echo "## ----------------------------------------- ##
2539## Report this to build-dev@openjdk.java.net ##
2540## ----------------------------------------- ##"
2541     ) | sed "s/^/$as_me: WARNING:     /" >&2
2542    ;;
2543esac
2544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545$as_echo_n "checking for $2... " >&6; }
2546if eval \${$3+:} false; then :
2547  $as_echo_n "(cached) " >&6
2548else
2549  eval "$3=\$ac_header_compiler"
2550fi
2551eval ac_res=\$$3
2552	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2553$as_echo "$ac_res" >&6; }
2554fi
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556
2557} # ac_fn_cxx_check_header_mongrel
2558
2559# ac_fn_cxx_try_run LINENO
2560# ------------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2562# that executables *can* be run.
2563ac_fn_cxx_try_run ()
2564{
2565  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>&5
2574  ac_status=$?
2575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2576  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2577  { { case "(($ac_try" in
2578  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2579  *) ac_try_echo=$ac_try;;
2580esac
2581eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2582$as_echo "$ac_try_echo"; } >&5
2583  (eval "$ac_try") 2>&5
2584  ac_status=$?
2585  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586  test $ac_status = 0; }; }; then :
2587  ac_retval=0
2588else
2589  $as_echo "$as_me: program exited with status $ac_status" >&5
2590       $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593       ac_retval=$ac_status
2594fi
2595  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2596  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597  as_fn_set_status $ac_retval
2598
2599} # ac_fn_cxx_try_run
2600
2601# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2602# ---------------------------------------------------------
2603# Tests whether HEADER exists and can be compiled using the include files in
2604# INCLUDES, setting the cache variable VAR accordingly.
2605ac_fn_cxx_check_header_compile ()
2606{
2607  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2609$as_echo_n "checking for $2... " >&6; }
2610if eval \${$3+:} false; then :
2611  $as_echo_n "(cached) " >&6
2612else
2613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2614/* end confdefs.h.  */
2615$4
2616#include <$2>
2617_ACEOF
2618if ac_fn_cxx_try_compile "$LINENO"; then :
2619  eval "$3=yes"
2620else
2621  eval "$3=no"
2622fi
2623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624fi
2625eval ac_res=\$$3
2626	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627$as_echo "$ac_res" >&6; }
2628  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630} # ac_fn_cxx_check_header_compile
2631
2632# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2633# ----------------------------------------------
2634# Tries to find the compile-time value of EXPR in a program that includes
2635# INCLUDES, setting VAR accordingly. Returns whether the value could be
2636# computed
2637ac_fn_cxx_compute_int ()
2638{
2639  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2640  if test "$cross_compiling" = yes; then
2641    # Depending upon the size, compute the lo and hi bounds.
2642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644$4
2645int
2646main ()
2647{
2648static int test_array [1 - 2 * !(($2) >= 0)];
2649test_array [0] = 0;
2650return test_array [0];
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  ac_lo=0 ac_mid=0
2658  while :; do
2659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid; break
2675else
2676  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2677			if test $ac_lo -le $ac_mid; then
2678			  ac_lo= ac_hi=
2679			  break
2680			fi
2681			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684  done
2685else
2686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2687/* end confdefs.h.  */
2688$4
2689int
2690main ()
2691{
2692static int test_array [1 - 2 * !(($2) < 0)];
2693test_array [0] = 0;
2694return test_array [0];
2695
2696  ;
2697  return 0;
2698}
2699_ACEOF
2700if ac_fn_cxx_try_compile "$LINENO"; then :
2701  ac_hi=-1 ac_mid=-1
2702  while :; do
2703    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2704/* end confdefs.h.  */
2705$4
2706int
2707main ()
2708{
2709static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2710test_array [0] = 0;
2711return test_array [0];
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_compile "$LINENO"; then :
2718  ac_lo=$ac_mid; break
2719else
2720  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2721			if test $ac_mid -le $ac_hi; then
2722			  ac_lo= ac_hi=
2723			  break
2724			fi
2725			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2726fi
2727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2728  done
2729else
2730  ac_lo= ac_hi=
2731fi
2732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2733fi
2734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2735# Binary search between lo and hi bounds.
2736while test "x$ac_lo" != "x$ac_hi"; do
2737  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739/* end confdefs.h.  */
2740$4
2741int
2742main ()
2743{
2744static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2745test_array [0] = 0;
2746return test_array [0];
2747
2748  ;
2749  return 0;
2750}
2751_ACEOF
2752if ac_fn_cxx_try_compile "$LINENO"; then :
2753  ac_hi=$ac_mid
2754else
2755  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2756fi
2757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2758done
2759case $ac_lo in #((
2760?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2761'') ac_retval=1 ;;
2762esac
2763  else
2764    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2765/* end confdefs.h.  */
2766$4
2767static long int longval () { return $2; }
2768static unsigned long int ulongval () { return $2; }
2769#include <stdio.h>
2770#include <stdlib.h>
2771int
2772main ()
2773{
2774
2775  FILE *f = fopen ("conftest.val", "w");
2776  if (! f)
2777    return 1;
2778  if (($2) < 0)
2779    {
2780      long int i = longval ();
2781      if (i != ($2))
2782	return 1;
2783      fprintf (f, "%ld", i);
2784    }
2785  else
2786    {
2787      unsigned long int i = ulongval ();
2788      if (i != ($2))
2789	return 1;
2790      fprintf (f, "%lu", i);
2791    }
2792  /* Do not output a trailing newline, as this causes \r\n confusion
2793     on some platforms.  */
2794  return ferror (f) || fclose (f) != 0;
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_run "$LINENO"; then :
2801  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2802else
2803  ac_retval=1
2804fi
2805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2806  conftest.$ac_objext conftest.beam conftest.$ac_ext
2807rm -f conftest.val
2808
2809  fi
2810  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2811  as_fn_set_status $ac_retval
2812
2813} # ac_fn_cxx_compute_int
2814
2815# ac_fn_cxx_try_link LINENO
2816# -------------------------
2817# Try to link conftest.$ac_ext, and return whether this succeeded.
2818ac_fn_cxx_try_link ()
2819{
2820  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2821  rm -f conftest.$ac_objext conftest$ac_exeext
2822  if { { ac_try="$ac_link"
2823case "(($ac_try" in
2824  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825  *) ac_try_echo=$ac_try;;
2826esac
2827eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2828$as_echo "$ac_try_echo"; } >&5
2829  (eval "$ac_link") 2>conftest.err
2830  ac_status=$?
2831  if test -s conftest.err; then
2832    grep -v '^ *+' conftest.err >conftest.er1
2833    cat conftest.er1 >&5
2834    mv -f conftest.er1 conftest.err
2835  fi
2836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2837  test $ac_status = 0; } && {
2838	 test -z "$ac_cxx_werror_flag" ||
2839	 test ! -s conftest.err
2840       } && test -s conftest$ac_exeext && {
2841	 test "$cross_compiling" = yes ||
2842	 test -x conftest$ac_exeext
2843       }; then :
2844  ac_retval=0
2845else
2846  $as_echo "$as_me: failed program was:" >&5
2847sed 's/^/| /' conftest.$ac_ext >&5
2848
2849	ac_retval=1
2850fi
2851  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2852  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2853  # interfere with the next link command; also delete a directory that is
2854  # left behind by Apple's compiler.  We do this before executing the actions.
2855  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2856  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2857  as_fn_set_status $ac_retval
2858
2859} # ac_fn_cxx_try_link
2860
2861# ac_fn_cxx_check_func LINENO FUNC VAR
2862# ------------------------------------
2863# Tests whether FUNC exists, setting the cache variable VAR accordingly
2864ac_fn_cxx_check_func ()
2865{
2866  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2868$as_echo_n "checking for $2... " >&6; }
2869if eval \${$3+:} false; then :
2870  $as_echo_n "(cached) " >&6
2871else
2872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2873/* end confdefs.h.  */
2874/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2875   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2876#define $2 innocuous_$2
2877
2878/* System header to define __stub macros and hopefully few prototypes,
2879    which can conflict with char $2 (); below.
2880    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2881    <limits.h> exists even on freestanding compilers.  */
2882
2883#ifdef __STDC__
2884# include <limits.h>
2885#else
2886# include <assert.h>
2887#endif
2888
2889#undef $2
2890
2891/* Override any GCC internal prototype to avoid an error.
2892   Use char because int might match the return type of a GCC
2893   builtin and then its argument prototype would still apply.  */
2894#ifdef __cplusplus
2895extern "C"
2896#endif
2897char $2 ();
2898/* The GNU C library defines this for functions which it implements
2899    to always fail with ENOSYS.  Some functions are actually named
2900    something starting with __ and the normal name is an alias.  */
2901#if defined __stub_$2 || defined __stub___$2
2902choke me
2903#endif
2904
2905int
2906main ()
2907{
2908return $2 ();
2909  ;
2910  return 0;
2911}
2912_ACEOF
2913if ac_fn_cxx_try_link "$LINENO"; then :
2914  eval "$3=yes"
2915else
2916  eval "$3=no"
2917fi
2918rm -f core conftest.err conftest.$ac_objext \
2919    conftest$ac_exeext conftest.$ac_ext
2920fi
2921eval ac_res=\$$3
2922	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2923$as_echo "$ac_res" >&6; }
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925
2926} # ac_fn_cxx_check_func
2927
2928# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2929# -------------------------------------------------------
2930# Tests whether HEADER exists and can be compiled using the include files in
2931# INCLUDES, setting the cache variable VAR accordingly.
2932ac_fn_c_check_header_compile ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2936$as_echo_n "checking for $2... " >&6; }
2937if eval \${$3+:} false; then :
2938  $as_echo_n "(cached) " >&6
2939else
2940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2941/* end confdefs.h.  */
2942$4
2943#include <$2>
2944_ACEOF
2945if ac_fn_c_try_compile "$LINENO"; then :
2946  eval "$3=yes"
2947else
2948  eval "$3=no"
2949fi
2950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2951fi
2952eval ac_res=\$$3
2953	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2954$as_echo "$ac_res" >&6; }
2955  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2956
2957} # ac_fn_c_check_header_compile
2958cat >config.log <<_ACEOF
2959This file contains any messages produced by compilers while
2960running configure, to aid debugging if configure makes a mistake.
2961
2962It was created by OpenJDK $as_me jdk9, which was
2963generated by GNU Autoconf 2.69.  Invocation command line was
2964
2965  $ $0 $@
2966
2967_ACEOF
2968exec 5>>config.log
2969{
2970cat <<_ASUNAME
2971## --------- ##
2972## Platform. ##
2973## --------- ##
2974
2975hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2976uname -m = `(uname -m) 2>/dev/null || echo unknown`
2977uname -r = `(uname -r) 2>/dev/null || echo unknown`
2978uname -s = `(uname -s) 2>/dev/null || echo unknown`
2979uname -v = `(uname -v) 2>/dev/null || echo unknown`
2980
2981/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2982/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2983
2984/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2985/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2986/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2987/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2988/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2989/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2990/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2991
2992_ASUNAME
2993
2994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2995for as_dir in $PATH
2996do
2997  IFS=$as_save_IFS
2998  test -z "$as_dir" && as_dir=.
2999    $as_echo "PATH: $as_dir"
3000  done
3001IFS=$as_save_IFS
3002
3003} >&5
3004
3005cat >&5 <<_ACEOF
3006
3007
3008## ----------- ##
3009## Core tests. ##
3010## ----------- ##
3011
3012_ACEOF
3013
3014
3015# Keep a trace of the command line.
3016# Strip out --no-create and --no-recursion so they do not pile up.
3017# Strip out --silent because we don't want to record it for future runs.
3018# Also quote any args containing shell meta-characters.
3019# Make two passes to allow for proper duplicate-argument suppression.
3020ac_configure_args=
3021ac_configure_args0=
3022ac_configure_args1=
3023ac_must_keep_next=false
3024for ac_pass in 1 2
3025do
3026  for ac_arg
3027  do
3028    case $ac_arg in
3029    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3030    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3031    | -silent | --silent | --silen | --sile | --sil)
3032      continue ;;
3033    *\'*)
3034      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3035    esac
3036    case $ac_pass in
3037    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3038    2)
3039      as_fn_append ac_configure_args1 " '$ac_arg'"
3040      if test $ac_must_keep_next = true; then
3041	ac_must_keep_next=false # Got value, back to normal.
3042      else
3043	case $ac_arg in
3044	  *=* | --config-cache | -C | -disable-* | --disable-* \
3045	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3046	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3047	  | -with-* | --with-* | -without-* | --without-* | --x)
3048	    case "$ac_configure_args0 " in
3049	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3050	    esac
3051	    ;;
3052	  -* ) ac_must_keep_next=true ;;
3053	esac
3054      fi
3055      as_fn_append ac_configure_args " '$ac_arg'"
3056      ;;
3057    esac
3058  done
3059done
3060{ ac_configure_args0=; unset ac_configure_args0;}
3061{ ac_configure_args1=; unset ac_configure_args1;}
3062
3063# When interrupted or exit'd, cleanup temporary files, and complete
3064# config.log.  We remove comments because anyway the quotes in there
3065# would cause problems or look ugly.
3066# WARNING: Use '\'' to represent an apostrophe within the trap.
3067# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3068trap 'exit_status=$?
3069  # Save into config.log some information that might help in debugging.
3070  {
3071    echo
3072
3073    $as_echo "## ---------------- ##
3074## Cache variables. ##
3075## ---------------- ##"
3076    echo
3077    # The following way of writing the cache mishandles newlines in values,
3078(
3079  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3080    eval ac_val=\$$ac_var
3081    case $ac_val in #(
3082    *${as_nl}*)
3083      case $ac_var in #(
3084      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3085$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3086      esac
3087      case $ac_var in #(
3088      _ | IFS | as_nl) ;; #(
3089      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3090      *) { eval $ac_var=; unset $ac_var;} ;;
3091      esac ;;
3092    esac
3093  done
3094  (set) 2>&1 |
3095    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3096    *${as_nl}ac_space=\ *)
3097      sed -n \
3098	"s/'\''/'\''\\\\'\'''\''/g;
3099	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3100      ;; #(
3101    *)
3102      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3103      ;;
3104    esac |
3105    sort
3106)
3107    echo
3108
3109    $as_echo "## ----------------- ##
3110## Output variables. ##
3111## ----------------- ##"
3112    echo
3113    for ac_var in $ac_subst_vars
3114    do
3115      eval ac_val=\$$ac_var
3116      case $ac_val in
3117      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3118      esac
3119      $as_echo "$ac_var='\''$ac_val'\''"
3120    done | sort
3121    echo
3122
3123    if test -n "$ac_subst_files"; then
3124      $as_echo "## ------------------- ##
3125## File substitutions. ##
3126## ------------------- ##"
3127      echo
3128      for ac_var in $ac_subst_files
3129      do
3130	eval ac_val=\$$ac_var
3131	case $ac_val in
3132	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3133	esac
3134	$as_echo "$ac_var='\''$ac_val'\''"
3135      done | sort
3136      echo
3137    fi
3138
3139    if test -s confdefs.h; then
3140      $as_echo "## ----------- ##
3141## confdefs.h. ##
3142## ----------- ##"
3143      echo
3144      cat confdefs.h
3145      echo
3146    fi
3147    test "$ac_signal" != 0 &&
3148      $as_echo "$as_me: caught signal $ac_signal"
3149    $as_echo "$as_me: exit $exit_status"
3150  } >&5
3151  rm -f core *.core core.conftest.* &&
3152    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3153    exit $exit_status
3154' 0
3155for ac_signal in 1 2 13 15; do
3156  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3157done
3158ac_signal=0
3159
3160# confdefs.h avoids OS command line length limits that DEFS can exceed.
3161rm -f -r conftest* confdefs.h
3162
3163$as_echo "/* confdefs.h */" > confdefs.h
3164
3165# Predefined preprocessor variables.
3166
3167cat >>confdefs.h <<_ACEOF
3168#define PACKAGE_NAME "$PACKAGE_NAME"
3169_ACEOF
3170
3171cat >>confdefs.h <<_ACEOF
3172#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3173_ACEOF
3174
3175cat >>confdefs.h <<_ACEOF
3176#define PACKAGE_VERSION "$PACKAGE_VERSION"
3177_ACEOF
3178
3179cat >>confdefs.h <<_ACEOF
3180#define PACKAGE_STRING "$PACKAGE_STRING"
3181_ACEOF
3182
3183cat >>confdefs.h <<_ACEOF
3184#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3185_ACEOF
3186
3187cat >>confdefs.h <<_ACEOF
3188#define PACKAGE_URL "$PACKAGE_URL"
3189_ACEOF
3190
3191
3192# Let the site file select an alternate cache file if it wants to.
3193# Prefer an explicitly selected file to automatically selected ones.
3194ac_site_file1=NONE
3195ac_site_file2=NONE
3196if test -n "$CONFIG_SITE"; then
3197  # We do not want a PATH search for config.site.
3198  case $CONFIG_SITE in #((
3199    -*)  ac_site_file1=./$CONFIG_SITE;;
3200    */*) ac_site_file1=$CONFIG_SITE;;
3201    *)   ac_site_file1=./$CONFIG_SITE;;
3202  esac
3203elif test "x$prefix" != xNONE; then
3204  ac_site_file1=$prefix/share/config.site
3205  ac_site_file2=$prefix/etc/config.site
3206else
3207  ac_site_file1=$ac_default_prefix/share/config.site
3208  ac_site_file2=$ac_default_prefix/etc/config.site
3209fi
3210for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3211do
3212  test "x$ac_site_file" = xNONE && continue
3213  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3214    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3215$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3216    sed 's/^/| /' "$ac_site_file" >&5
3217    . "$ac_site_file" \
3218      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3220as_fn_error $? "failed to load site script $ac_site_file
3221See \`config.log' for more details" "$LINENO" 5; }
3222  fi
3223done
3224
3225if test -r "$cache_file"; then
3226  # Some versions of bash will fail to source /dev/null (special files
3227  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3228  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3229    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3230$as_echo "$as_me: loading cache $cache_file" >&6;}
3231    case $cache_file in
3232      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3233      *)                      . "./$cache_file";;
3234    esac
3235  fi
3236else
3237  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3238$as_echo "$as_me: creating cache $cache_file" >&6;}
3239  >$cache_file
3240fi
3241
3242# Check that the precious variables saved in the cache have kept the same
3243# value.
3244ac_cache_corrupted=false
3245for ac_var in $ac_precious_vars; do
3246  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3247  eval ac_new_set=\$ac_env_${ac_var}_set
3248  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3249  eval ac_new_val=\$ac_env_${ac_var}_value
3250  case $ac_old_set,$ac_new_set in
3251    set,)
3252      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3253$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3254      ac_cache_corrupted=: ;;
3255    ,set)
3256      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3257$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3258      ac_cache_corrupted=: ;;
3259    ,);;
3260    *)
3261      if test "x$ac_old_val" != "x$ac_new_val"; then
3262	# differences in whitespace do not lead to failure.
3263	ac_old_val_w=`echo x $ac_old_val`
3264	ac_new_val_w=`echo x $ac_new_val`
3265	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3266	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3267$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3268	  ac_cache_corrupted=:
3269	else
3270	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3271$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3272	  eval $ac_var=\$ac_old_val
3273	fi
3274	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3275$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3276	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3277$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3278      fi;;
3279  esac
3280  # Pass precious variables to config.status.
3281  if test "$ac_new_set" = set; then
3282    case $ac_new_val in
3283    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3284    *) ac_arg=$ac_var=$ac_new_val ;;
3285    esac
3286    case " $ac_configure_args " in
3287      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3288      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3289    esac
3290  fi
3291done
3292if $ac_cache_corrupted; then
3293  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3295  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3296$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3297  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3298fi
3299## -------------------- ##
3300## Main body of script. ##
3301## -------------------- ##
3302
3303ac_ext=c
3304ac_cpp='$CPP $CPPFLAGS'
3305ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3306ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3307ac_compiler_gnu=$ac_cv_c_compiler_gnu
3308
3309
3310
3311ac_aux_dir=
3312for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3313  if test -f "$ac_dir/install-sh"; then
3314    ac_aux_dir=$ac_dir
3315    ac_install_sh="$ac_aux_dir/install-sh -c"
3316    break
3317  elif test -f "$ac_dir/install.sh"; then
3318    ac_aux_dir=$ac_dir
3319    ac_install_sh="$ac_aux_dir/install.sh -c"
3320    break
3321  elif test -f "$ac_dir/shtool"; then
3322    ac_aux_dir=$ac_dir
3323    ac_install_sh="$ac_aux_dir/shtool install -c"
3324    break
3325  fi
3326done
3327if test -z "$ac_aux_dir"; then
3328  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
3329fi
3330
3331# These three variables are undocumented and unsupported,
3332# and are intended to be withdrawn in a future Autoconf release.
3333# They can cause serious problems if a builder's source tree is in a directory
3334# whose full name contains unusual characters.
3335ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3336ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3337ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3338
3339
3340# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3341
3342#
3343# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3344# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3345#
3346# This code is free software; you can redistribute it and/or modify it
3347# under the terms of the GNU General Public License version 2 only, as
3348# published by the Free Software Foundation.  Oracle designates this
3349# particular file as subject to the "Classpath" exception as provided
3350# by Oracle in the LICENSE file that accompanied this code.
3351#
3352# This code is distributed in the hope that it will be useful, but WITHOUT
3353# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3354# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3355# version 2 for more details (a copy is included in the LICENSE file that
3356# accompanied this code).
3357#
3358# You should have received a copy of the GNU General Public License version
3359# 2 along with this work; if not, write to the Free Software Foundation,
3360# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3361#
3362# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3363# or visit www.oracle.com if you need additional information or have any
3364# questions.
3365#
3366
3367#
3368# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3369#
3370# This program is free software; you can redistribute it and/or modify
3371# it under the terms of the GNU General Public License as published by
3372# the Free Software Foundation; either version 2 of the License, or
3373# (at your option) any later version.
3374#
3375# This program is distributed in the hope that it will be useful, but
3376# WITHOUT ANY WARRANTY; without even the implied warranty of
3377# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3378# General Public License for more details.
3379#
3380# You should have received a copy of the GNU General Public License
3381# along with this program; if not, write to the Free Software
3382# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3383#
3384# As a special exception to the GNU General Public License, if you
3385# distribute this file as part of a program that contains a
3386# configuration script generated by Autoconf, you may include it under
3387# the same distribution terms that you use for the rest of that program.
3388
3389# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3390# ----------------------------------
3391# PKG_PROG_PKG_CONFIG
3392
3393# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3394#
3395# Check to see whether a particular set of modules exists.  Similar
3396# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3397#
3398#
3399# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3400# this or PKG_CHECK_MODULES is called, or make sure to call
3401# PKG_CHECK_EXISTS manually
3402# --------------------------------------------------------------
3403
3404
3405
3406# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3407# ---------------------------------------------
3408# _PKG_CONFIG
3409
3410# _PKG_SHORT_ERRORS_SUPPORTED
3411# -----------------------------
3412# _PKG_SHORT_ERRORS_SUPPORTED
3413
3414
3415# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3416# [ACTION-IF-NOT-FOUND])
3417#
3418#
3419# Note that if there is a possibility the first call to
3420# PKG_CHECK_MODULES might not happen, you should be sure to include an
3421# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3422#
3423#
3424# --------------------------------------------------------------
3425# PKG_CHECK_MODULES
3426
3427
3428# Include these first...
3429#
3430# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3431# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3432#
3433# This code is free software; you can redistribute it and/or modify it
3434# under the terms of the GNU General Public License version 2 only, as
3435# published by the Free Software Foundation.  Oracle designates this
3436# particular file as subject to the "Classpath" exception as provided
3437# by Oracle in the LICENSE file that accompanied this code.
3438#
3439# This code is distributed in the hope that it will be useful, but WITHOUT
3440# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3441# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3442# version 2 for more details (a copy is included in the LICENSE file that
3443# accompanied this code).
3444#
3445# You should have received a copy of the GNU General Public License version
3446# 2 along with this work; if not, write to the Free Software Foundation,
3447# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3448#
3449# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3450# or visit www.oracle.com if you need additional information or have any
3451# questions.
3452#
3453
3454# Create a function/macro that takes a series of named arguments. The call is
3455# similar to AC_DEFUN, but the setup of the function looks like this:
3456# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3457# ... do something
3458#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3459# ])
3460# A star (*) in front of a named argument means that it is required and it's
3461# presence will be verified. To pass e.g. the first value as a normal indexed
3462# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3463# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3464# "ARG_FOO".
3465#
3466# The generated function can be called like this:
3467# MYFUNC(FOO: [foo-val], BAR:
3468#     [
3469#         $ECHO hello world
3470#     ])
3471#
3472#
3473# Argument 1: Name of the function to define
3474# Argument 2: List of legal named arguments, with a * prefix for required arguments
3475# Argument 3: Argument array to treat as named, typically $@
3476# Argument 4: The main function body
3477
3478
3479# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3480# If so, then append $1 to $2 \
3481# Also set JVM_ARG_OK to true/false depending on outcome.
3482
3483
3484# Appends a string to a path variable, only adding the : when needed.
3485
3486
3487# Prepends a string to a path variable, only adding the : when needed.
3488
3489
3490# This will make sure the given variable points to a full and proper
3491# path. This means:
3492# 1) There will be no spaces in the path. On unix platforms,
3493#    spaces in the path will result in an error. On Windows,
3494#    the path will be rewritten using short-style to be space-free.
3495# 2) The path will be absolute, and it will be in unix-style (on
3496#     cygwin).
3497# $1: The name of the variable to fix
3498
3499
3500# This will make sure the given variable points to a executable
3501# with a full and proper path. This means:
3502# 1) There will be no spaces in the path. On unix platforms,
3503#    spaces in the path will result in an error. On Windows,
3504#    the path will be rewritten using short-style to be space-free.
3505# 2) The path will be absolute, and it will be in unix-style (on
3506#     cygwin).
3507# Any arguments given to the executable is preserved.
3508# If the input variable does not have a directory specification, then
3509# it need to be in the PATH.
3510# $1: The name of the variable to fix
3511
3512
3513
3514
3515# Register a --with argument but mark it as deprecated
3516# $1: The name of the with argument to deprecate, not including --with-
3517
3518
3519# Register a --enable argument but mark it as deprecated
3520# $1: The name of the with argument to deprecate, not including --enable-
3521# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3522# $3: Messages to user.
3523
3524
3525
3526
3527# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3528# $1: variable to check
3529
3530
3531# Check that there are no unprocessed overridden variables left.
3532# If so, they are an incorrect argument and we will exit with an error.
3533
3534
3535# Setup a tool for the given variable. If correctly specified by the user,
3536# use that value, otherwise search for the tool using the supplied code snippet.
3537# $1: variable to set
3538# $2: code snippet to call to look for the tool
3539# $3: code snippet to call if variable was used to find tool
3540
3541
3542# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3543# $1: variable to set
3544# $2: executable name (or list of names) to look for
3545
3546
3547# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3548# $1: variable to set
3549# $2: executable name (or list of names) to look for
3550
3551
3552# Like BASIC_PATH_PROGS but fails if no tool was found.
3553# $1: variable to set
3554# $2: executable name (or list of names) to look for
3555
3556
3557# Like BASIC_SETUP_TOOL but fails if no tool was found.
3558# $1: variable to set
3559# $2: autoconf macro to call to look for the special tool
3560
3561
3562# Setup the most fundamental tools that relies on not much else to set up,
3563# but is used by much of the early bootstrap code.
3564
3565
3566# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3567
3568
3569# Evaluates platform specific overrides for devkit variables.
3570# $1: Name of variable
3571
3572
3573
3574
3575
3576
3577#%%% Simple tools %%%
3578
3579# Check if we have found a usable version of make
3580# $1: the path to a potential make binary (or empty)
3581# $2: the description on how we found this
3582
3583
3584
3585
3586# Goes looking for a usable version of GNU make.
3587
3588
3589
3590
3591
3592
3593# Check if build directory is on local disk. If not possible to determine,
3594# we prefer to claim it's local.
3595# Argument 1: directory to test
3596# Argument 2: what to do if it is on local disk
3597# Argument 3: what to do otherwise (remote disk or failure)
3598
3599
3600# Check that source files have basic read permissions set. This might
3601# not be the case in cygwin in certain conditions.
3602
3603
3604
3605
3606# Check for support for specific options in bash
3607
3608
3609################################################################################
3610#
3611# Default make target
3612#
3613
3614
3615# Code to run after AC_OUTPUT
3616
3617
3618#
3619# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3621#
3622# This code is free software; you can redistribute it and/or modify it
3623# under the terms of the GNU General Public License version 2 only, as
3624# published by the Free Software Foundation.  Oracle designates this
3625# particular file as subject to the "Classpath" exception as provided
3626# by Oracle in the LICENSE file that accompanied this code.
3627#
3628# This code is distributed in the hope that it will be useful, but WITHOUT
3629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3631# version 2 for more details (a copy is included in the LICENSE file that
3632# accompanied this code).
3633#
3634# You should have received a copy of the GNU General Public License version
3635# 2 along with this work; if not, write to the Free Software Foundation,
3636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3637#
3638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3639# or visit www.oracle.com if you need additional information or have any
3640# questions.
3641#
3642
3643
3644
3645
3646
3647# Helper function which possibly converts a path using DOS-style short mode.
3648# If so, the updated path is stored in $new_path.
3649# $1: The path to check
3650
3651
3652# Helper function which possibly converts a path using DOS-style short mode.
3653# If so, the updated path is stored in $new_path.
3654# $1: The path to check
3655
3656
3657# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3658# and could probably be heavily simplified. However, all changes in this
3659# area tend to need lot of testing in different scenarios, and in lack of
3660# proper unit testing, cleaning this up has not been deemed worth the effort
3661# at the moment.
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3672
3673
3674
3675
3676# ... then the rest
3677#
3678# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3679# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3680#
3681# This code is free software; you can redistribute it and/or modify it
3682# under the terms of the GNU General Public License version 2 only, as
3683# published by the Free Software Foundation.  Oracle designates this
3684# particular file as subject to the "Classpath" exception as provided
3685# by Oracle in the LICENSE file that accompanied this code.
3686#
3687# This code is distributed in the hope that it will be useful, but WITHOUT
3688# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3689# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3690# version 2 for more details (a copy is included in the LICENSE file that
3691# accompanied this code).
3692#
3693# You should have received a copy of the GNU General Public License version
3694# 2 along with this work; if not, write to the Free Software Foundation,
3695# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3696#
3697# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3698# or visit www.oracle.com if you need additional information or have any
3699# questions.
3700#
3701
3702########################################################################
3703# This file handles detection of the Boot JDK. The Boot JDK detection
3704# process has been developed as a response to solve a complex real-world
3705# problem. Initially, it was simple, but it has grown as platform after
3706# platform, idiosyncracy after idiosyncracy has been supported.
3707#
3708# The basic idea is this:
3709# 1) You need an acceptable *) JDK to use as a Boot JDK
3710# 2) There are several ways to locate a JDK, that are mostly platform
3711#    dependent **)
3712# 3) You can have multiple JDKs installed
3713# 4) If possible, configure should try to dig out an acceptable JDK
3714#    automatically, without having to resort to command-line options
3715#
3716# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3717#     javac) and not a JRE, etc.
3718#
3719# **) On Windows we typically use a well-known path.
3720#     On MacOSX we typically use the tool java_home.
3721#     On Linux we typically find javac in the $PATH, and then follow a
3722#     chain of symlinks that often ends up in a real JDK.
3723#
3724# This leads to the code where we check in different ways to locate a
3725# JDK, and if one is found, check if it is acceptable. If not, we print
3726# our reasons for rejecting it (useful when debugging non-working
3727# configure situations) and continue checking the next one.
3728########################################################################
3729
3730# Execute the check given as argument, and verify the result
3731# If the Boot JDK was previously found, do nothing
3732# $1 A command line (typically autoconf macro) to execute
3733
3734
3735# Test: Is bootjdk explicitely set by command line arguments?
3736
3737
3738# Test: Is $JAVA_HOME set?
3739
3740
3741# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3742
3743
3744# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3745# $1: Argument to the java_home binary (optional)
3746
3747
3748# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3749
3750
3751# Look for a jdk in the given path. If there are multiple, try to select the newest.
3752# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3753# $1 = Path to directory containing jdk installations.
3754# $2 = String to append to the found JDK directory to get the proper JDK home
3755
3756
3757# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3758# environmental variable as base for where to look.
3759# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3760
3761
3762# Test: Is there a JDK installed in default, well-known locations?
3763
3764
3765# Check that a command-line tool in the Boot JDK is correct
3766# $1 = name of variable to assign
3767# $2 = name of binary
3768
3769
3770###############################################################################
3771#
3772# We need a Boot JDK to bootstrap the build.
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
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820################################################################################
3821#
3822# Runs icecc-create-env once and prints the error if it fails
3823#
3824# $1: arguments to icecc-create-env
3825# $2: log file
3826#
3827
3828
3829################################################################################
3830#
3831# Optionally enable distributed compilation of native code using icecc/icecream
3832#
3833
3834
3835
3836
3837
3838
3839
3840#
3841# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3842# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3843#
3844# This code is free software; you can redistribute it and/or modify it
3845# under the terms of the GNU General Public License version 2 only, as
3846# published by the Free Software Foundation.  Oracle designates this
3847# particular file as subject to the "Classpath" exception as provided
3848# by Oracle in the LICENSE file that accompanied this code.
3849#
3850# This code is distributed in the hope that it will be useful, but WITHOUT
3851# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3852# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3853# version 2 for more details (a copy is included in the LICENSE file that
3854# accompanied this code).
3855#
3856# You should have received a copy of the GNU General Public License version
3857# 2 along with this work; if not, write to the Free Software Foundation,
3858# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3859#
3860# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3861# or visit www.oracle.com if you need additional information or have any
3862# questions.
3863#
3864
3865# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3866# corresponding configure arguments instead
3867
3868
3869# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3870# that configure can use them while detecting compilers.
3871# TOOLCHAIN_TYPE is available here.
3872# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3873
3874
3875
3876
3877
3878
3879# Documentation on common flags used for solstudio in HIGHEST.
3880#
3881# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3882#          done with care, there are some assumptions below that need to
3883#          be understood about the use of pointers, and IEEE behavior.
3884#
3885# -fns: Use non-standard floating point mode (not IEEE 754)
3886# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3887# -fsingle: Use single precision floating point with 'float'
3888# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3889#   (Source with excessing pointer casting and data access with mixed
3890#    pointer types are not recommended)
3891# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3892#   (If you expect perfect errno behavior, do not use this)
3893# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3894# -xrestrict: Pointer parameters to functions do not overlap
3895#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3896#    If you pass in multiple pointers to the same data, do not use this)
3897# -xlibmil: Inline some library routines
3898#   (If you expect perfect errno behavior, do not use this)
3899# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3900#   (If you expect perfect errno behavior, do not use this)
3901#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3902
3903    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3904    # Bug?
3905    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3906    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3907    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3908    #fi
3909
3910
3911
3912
3913
3914# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3915#                                   IF_FALSE: [RUN-IF-FALSE])
3916# ------------------------------------------------------------
3917# Check that the c and c++ compilers support an argument
3918
3919
3920
3921
3922# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
3923#                                   IF_FALSE: [RUN-IF-FALSE])
3924# ------------------------------------------------------------
3925# Check that the linker support an argument
3926
3927
3928
3929
3930
3931
3932#
3933# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3935#
3936# This code is free software; you can redistribute it and/or modify it
3937# under the terms of the GNU General Public License version 2 only, as
3938# published by the Free Software Foundation.  Oracle designates this
3939# particular file as subject to the "Classpath" exception as provided
3940# by Oracle in the LICENSE file that accompanied this code.
3941#
3942# This code is distributed in the hope that it will be useful, but WITHOUT
3943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3945# version 2 for more details (a copy is included in the LICENSE file that
3946# accompanied this code).
3947#
3948# You should have received a copy of the GNU General Public License version
3949# 2 along with this work; if not, write to the Free Software Foundation,
3950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3951#
3952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3953# or visit www.oracle.com if you need additional information or have any
3954# questions.
3955#
3956
3957
3958
3959
3960
3961cygwin_help() {
3962  case $1 in
3963    unzip)
3964      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3965      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3966      ;;
3967    zip)
3968      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3969      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3970      ;;
3971    make)
3972      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3973      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3974      ;;
3975    freetype)
3976      HELP_MSG="
3977The freetype library can now be build during the configure process.
3978Download the freetype sources and unpack them into an arbitrary directory:
3979
3980wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3981tar -xzf freetype-2.5.3.tar.gz
3982
3983Then run configure with '--with-freetype-src=<freetype_src>'. This will
3984automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3985builds or into '<freetype_src>/lib32' for 32-bit builds.
3986Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3987and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
3988
3989Alternatively you can unpack the sources like this to use the default directory:
3990
3991tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
3992      ;;
3993  esac
3994}
3995
3996msys_help() {
3997  PKGHANDLER_COMMAND=""
3998}
3999
4000apt_help() {
4001  case $1 in
4002    reduced)
4003      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4004    devkit)
4005      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4006    openjdk)
4007      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
4008    alsa)
4009      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4010    cups)
4011      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4012    freetype)
4013      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4014    ffi)
4015      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4016    x11)
4017      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4018    ccache)
4019      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4020  esac
4021}
4022
4023yum_help() {
4024  case $1 in
4025    devkit)
4026      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4027    openjdk)
4028      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
4029    alsa)
4030      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4031    cups)
4032      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4033    freetype)
4034      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4035    x11)
4036      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4037    ccache)
4038      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4039  esac
4040}
4041
4042port_help() {
4043  PKGHANDLER_COMMAND=""
4044}
4045
4046pkgutil_help() {
4047  PKGHANDLER_COMMAND=""
4048}
4049
4050pkgadd_help() {
4051  PKGHANDLER_COMMAND=""
4052}
4053
4054# This function will check if we're called from the "configure" wrapper while
4055# printing --help. If so, we will print out additional information that can
4056# only be extracted within the autoconf script, and then exit. This must be
4057# called at the very beginning in configure.ac.
4058
4059
4060
4061
4062
4063
4064#
4065# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4066# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4067#
4068# This code is free software; you can redistribute it and/or modify it
4069# under the terms of the GNU General Public License version 2 only, as
4070# published by the Free Software Foundation.  Oracle designates this
4071# particular file as subject to the "Classpath" exception as provided
4072# by Oracle in the LICENSE file that accompanied this code.
4073#
4074# This code is distributed in the hope that it will be useful, but WITHOUT
4075# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4076# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4077# version 2 for more details (a copy is included in the LICENSE file that
4078# accompanied this code).
4079#
4080# You should have received a copy of the GNU General Public License version
4081# 2 along with this work; if not, write to the Free Software Foundation,
4082# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4083#
4084# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4085# or visit www.oracle.com if you need additional information or have any
4086# questions.
4087#
4088
4089###############################################################################
4090# Check which interpreter of the JVM we want to build.
4091# Currently we have:
4092#    template: Template interpreter (the default)
4093#    cpp     : C++ interpreter
4094
4095
4096###############################################################################
4097# Check which variants of the JVM that we want to build.
4098# Currently we have:
4099#    server: normal interpreter and a C2 or tiered C1/C2 compiler
4100#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
4101#    minimal1: reduced form of client with optional VM services and features stripped out
4102#    zero: no machine code interpreter, no compiler
4103#    zeroshark: zero interpreter and shark/llvm compiler backend
4104#    core: interpreter only, no compiler (only works on some platforms)
4105
4106
4107
4108###############################################################################
4109# Setup legacy vars/targets and new vars to deal with different debug levels.
4110#
4111#    release: no debug information, all optimizations, no asserts.
4112#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4113#    fastdebug: debug information (-g), all optimizations, all asserts
4114#    slowdebug: debug information (-g), no optimizations, all asserts
4115#
4116
4117
4118
4119
4120
4121
4122    # -g is already added by ENABLE_DEBUG_SYMBOLS and the hotspot makefiles
4123    # will basically do slowdebug builds when DEBUG_BINARIES is set for
4124    # fastdebug builds
4125    DEBUG_BINARIES=false
4126    # Fastdebug builds with this setting will essentially be slowdebug
4127    # in hotspot.
4128    # -g is already added by ENABLE_DEBUG_SYMBOLS and the hotspot makefiles
4129    # will basically do slowdebug builds when DEBUG_BINARIES is set for
4130    # fastdebug builds
4131    DEBUG_BINARIES=false
4132#
4133# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4134# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4135#
4136# This code is free software; you can redistribute it and/or modify it
4137# under the terms of the GNU General Public License version 2 only, as
4138# published by the Free Software Foundation.  Oracle designates this
4139# particular file as subject to the "Classpath" exception as provided
4140# by Oracle in the LICENSE file that accompanied this code.
4141#
4142# This code is distributed in the hope that it will be useful, but WITHOUT
4143# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4144# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4145# version 2 for more details (a copy is included in the LICENSE file that
4146# accompanied this code).
4147#
4148# You should have received a copy of the GNU General Public License version
4149# 2 along with this work; if not, write to the Free Software Foundation,
4150# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4151#
4152# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4153# or visit www.oracle.com if you need additional information or have any
4154# questions.
4155#
4156
4157###############################################################################
4158# Check which variant of the JDK that we want to build.
4159# Currently we have:
4160#    normal:   standard edition
4161# but the custom make system may add other variants
4162#
4163# Effectively the JDK variant gives a name to a specific set of
4164# modules to compile into the JDK.
4165
4166
4167###############################################################################
4168# Set the debug level
4169#    release: no debug information, all optimizations, no asserts.
4170#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4171#    fastdebug: debug information (-g), all optimizations, all asserts
4172#    slowdebug: debug information (-g), no optimizations, all asserts
4173
4174
4175###############################################################################
4176#
4177# Should we build only OpenJDK even if closed sources are present?
4178#
4179
4180
4181
4182
4183###############################################################################
4184#
4185# Enable or disable the elliptic curve crypto implementation
4186#
4187
4188
4189
4190
4191################################################################################
4192#
4193# Gcov coverage data for hotspot
4194#
4195
4196
4197################################################################################
4198#
4199# Static build support.  When enabled will generate static
4200# libraries instead of shared libraries for all JDK libs.
4201#
4202
4203
4204#
4205# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4206# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4207#
4208# This code is free software; you can redistribute it and/or modify it
4209# under the terms of the GNU General Public License version 2 only, as
4210# published by the Free Software Foundation.  Oracle designates this
4211# particular file as subject to the "Classpath" exception as provided
4212# by Oracle in the LICENSE file that accompanied this code.
4213#
4214# This code is distributed in the hope that it will be useful, but WITHOUT
4215# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4216# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4217# version 2 for more details (a copy is included in the LICENSE file that
4218# accompanied this code).
4219#
4220# You should have received a copy of the GNU General Public License version
4221# 2 along with this work; if not, write to the Free Software Foundation,
4222# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4223#
4224# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4225# or visit www.oracle.com if you need additional information or have any
4226# questions.
4227#
4228
4229###############################################################################
4230#
4231# Setup version numbers
4232#
4233
4234# Verify that a given string represents a valid version number, and assign it
4235# to a variable.
4236
4237# Argument 1: the variable to assign to
4238# Argument 2: the value given by the user
4239
4240
4241
4242
4243#
4244# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4245# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4246#
4247# This code is free software; you can redistribute it and/or modify it
4248# under the terms of the GNU General Public License version 2 only, as
4249# published by the Free Software Foundation.  Oracle designates this
4250# particular file as subject to the "Classpath" exception as provided
4251# by Oracle in the LICENSE file that accompanied this code.
4252#
4253# This code is distributed in the hope that it will be useful, but WITHOUT
4254# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4255# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4256# version 2 for more details (a copy is included in the LICENSE file that
4257# accompanied this code).
4258#
4259# You should have received a copy of the GNU General Public License version
4260# 2 along with this work; if not, write to the Free Software Foundation,
4261# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4262#
4263# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4264# or visit www.oracle.com if you need additional information or have any
4265# questions.
4266#
4267
4268# Major library component reside in separate files.
4269#
4270# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4271# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4272#
4273# This code is free software; you can redistribute it and/or modify it
4274# under the terms of the GNU General Public License version 2 only, as
4275# published by the Free Software Foundation.  Oracle designates this
4276# particular file as subject to the "Classpath" exception as provided
4277# by Oracle in the LICENSE file that accompanied this code.
4278#
4279# This code is distributed in the hope that it will be useful, but WITHOUT
4280# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4281# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4282# version 2 for more details (a copy is included in the LICENSE file that
4283# accompanied this code).
4284#
4285# You should have received a copy of the GNU General Public License version
4286# 2 along with this work; if not, write to the Free Software Foundation,
4287# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4288#
4289# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4290# or visit www.oracle.com if you need additional information or have any
4291# questions.
4292#
4293
4294################################################################################
4295# Setup alsa (Advanced Linux Sound Architecture)
4296################################################################################
4297
4298
4299#
4300# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4301# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4302#
4303# This code is free software; you can redistribute it and/or modify it
4304# under the terms of the GNU General Public License version 2 only, as
4305# published by the Free Software Foundation.  Oracle designates this
4306# particular file as subject to the "Classpath" exception as provided
4307# by Oracle in the LICENSE file that accompanied this code.
4308#
4309# This code is distributed in the hope that it will be useful, but WITHOUT
4310# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4311# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4312# version 2 for more details (a copy is included in the LICENSE file that
4313# accompanied this code).
4314#
4315# You should have received a copy of the GNU General Public License version
4316# 2 along with this work; if not, write to the Free Software Foundation,
4317# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4318#
4319# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4320# or visit www.oracle.com if you need additional information or have any
4321# questions.
4322#
4323
4324################################################################################
4325# Setup bundled libraries.
4326#
4327# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4328# OpenJDK repository. Default is to use these libraries as bundled, but they
4329# might be replaced by en external version by the user.
4330################################################################################
4331
4332
4333################################################################################
4334# Setup libjpeg
4335################################################################################
4336
4337
4338################################################################################
4339# Setup giflib
4340################################################################################
4341
4342
4343################################################################################
4344# Setup libpng
4345################################################################################
4346
4347
4348################################################################################
4349# Setup zlib
4350################################################################################
4351
4352
4353################################################################################
4354# Setup lcms (Little CMS)
4355################################################################################
4356
4357
4358#
4359# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4360# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4361#
4362# This code is free software; you can redistribute it and/or modify it
4363# under the terms of the GNU General Public License version 2 only, as
4364# published by the Free Software Foundation.  Oracle designates this
4365# particular file as subject to the "Classpath" exception as provided
4366# by Oracle in the LICENSE file that accompanied this code.
4367#
4368# This code is distributed in the hope that it will be useful, but WITHOUT
4369# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4370# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4371# version 2 for more details (a copy is included in the LICENSE file that
4372# accompanied this code).
4373#
4374# You should have received a copy of the GNU General Public License version
4375# 2 along with this work; if not, write to the Free Software Foundation,
4376# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4377#
4378# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4379# or visit www.oracle.com if you need additional information or have any
4380# questions.
4381#
4382
4383################################################################################
4384# Setup cups (Common Unix Printing System)
4385################################################################################
4386
4387
4388#
4389# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4390# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4391#
4392# This code is free software; you can redistribute it and/or modify it
4393# under the terms of the GNU General Public License version 2 only, as
4394# published by the Free Software Foundation.  Oracle designates this
4395# particular file as subject to the "Classpath" exception as provided
4396# by Oracle in the LICENSE file that accompanied this code.
4397#
4398# This code is distributed in the hope that it will be useful, but WITHOUT
4399# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4400# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4401# version 2 for more details (a copy is included in the LICENSE file that
4402# accompanied this code).
4403#
4404# You should have received a copy of the GNU General Public License version
4405# 2 along with this work; if not, write to the Free Software Foundation,
4406# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4407#
4408# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4409# or visit www.oracle.com if you need additional information or have any
4410# questions.
4411#
4412
4413################################################################################
4414# Setup libffi (Foreign Function Interface)
4415################################################################################
4416
4417
4418#
4419# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4420# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4421#
4422# This code is free software; you can redistribute it and/or modify it
4423# under the terms of the GNU General Public License version 2 only, as
4424# published by the Free Software Foundation.  Oracle designates this
4425# particular file as subject to the "Classpath" exception as provided
4426# by Oracle in the LICENSE file that accompanied this code.
4427#
4428# This code is distributed in the hope that it will be useful, but WITHOUT
4429# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4430# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4431# version 2 for more details (a copy is included in the LICENSE file that
4432# accompanied this code).
4433#
4434# You should have received a copy of the GNU General Public License version
4435# 2 along with this work; if not, write to the Free Software Foundation,
4436# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4437#
4438# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4439# or visit www.oracle.com if you need additional information or have any
4440# questions.
4441#
4442
4443################################################################################
4444# Build the freetype lib from source
4445################################################################################
4446
4447
4448################################################################################
4449# Check if a potential freeype library match is correct and usable
4450################################################################################
4451
4452
4453################################################################################
4454# Setup freetype (The FreeType2 font rendering library)
4455################################################################################
4456
4457
4458#
4459# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4461#
4462# This code is free software; you can redistribute it and/or modify it
4463# under the terms of the GNU General Public License version 2 only, as
4464# published by the Free Software Foundation.  Oracle designates this
4465# particular file as subject to the "Classpath" exception as provided
4466# by Oracle in the LICENSE file that accompanied this code.
4467#
4468# This code is distributed in the hope that it will be useful, but WITHOUT
4469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4471# version 2 for more details (a copy is included in the LICENSE file that
4472# accompanied this code).
4473#
4474# You should have received a copy of the GNU General Public License version
4475# 2 along with this work; if not, write to the Free Software Foundation,
4476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4477#
4478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4479# or visit www.oracle.com if you need additional information or have any
4480# questions.
4481#
4482
4483################################################################################
4484# Setup the standard C/C++ runtime libraries.
4485#
4486# Most importantly, determine if stdc++ should be linked statically or
4487# dynamically.
4488################################################################################
4489
4490
4491#
4492# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4493# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4494#
4495# This code is free software; you can redistribute it and/or modify it
4496# under the terms of the GNU General Public License version 2 only, as
4497# published by the Free Software Foundation.  Oracle designates this
4498# particular file as subject to the "Classpath" exception as provided
4499# by Oracle in the LICENSE file that accompanied this code.
4500#
4501# This code is distributed in the hope that it will be useful, but WITHOUT
4502# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4503# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4504# version 2 for more details (a copy is included in the LICENSE file that
4505# accompanied this code).
4506#
4507# You should have received a copy of the GNU General Public License version
4508# 2 along with this work; if not, write to the Free Software Foundation,
4509# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4510#
4511# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4512# or visit www.oracle.com if you need additional information or have any
4513# questions.
4514#
4515
4516################################################################################
4517# Setup X11 Windows system
4518################################################################################
4519
4520
4521
4522################################################################################
4523# Determine which libraries are needed for this configuration
4524################################################################################
4525
4526
4527################################################################################
4528# Parse library options, and setup needed libraries
4529################################################################################
4530
4531
4532################################################################################
4533# Setup llvm (Low-Level VM)
4534################################################################################
4535
4536
4537################################################################################
4538# Setup various libraries, typically small system libraries
4539################################################################################
4540
4541
4542#
4543# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4544# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4545#
4546# This code is free software; you can redistribute it and/or modify it
4547# under the terms of the GNU General Public License version 2 only, as
4548# published by the Free Software Foundation.  Oracle designates this
4549# particular file as subject to the "Classpath" exception as provided
4550# by Oracle in the LICENSE file that accompanied this code.
4551#
4552# This code is distributed in the hope that it will be useful, but WITHOUT
4553# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4554# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4555# version 2 for more details (a copy is included in the LICENSE file that
4556# accompanied this code).
4557#
4558# You should have received a copy of the GNU General Public License version
4559# 2 along with this work; if not, write to the Free Software Foundation,
4560# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4561#
4562# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4563# or visit www.oracle.com if you need additional information or have any
4564# questions.
4565#
4566
4567# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4568# Converts autoconf style CPU name to OpenJDK style, into
4569# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4570
4571
4572# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4573# Converts autoconf style OS name to OpenJDK style, into
4574# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4575
4576
4577# Expects $host_os $host_cpu $build_os and $build_cpu
4578# and $with_target_bits to have been setup!
4579#
4580# Translate the standard triplet(quadruplet) definition
4581# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4582# OPENJDK_BUILD_OS, etc.
4583
4584
4585# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4586# accordingly. Must be done after setting up build and target system, but before
4587# doing anything else with these values.
4588
4589
4590# Setup the legacy variables, for controlling the old makefiles.
4591#
4592
4593
4594
4595
4596#%%% Build and target systems %%%
4597
4598
4599
4600
4601# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4602# Add -mX to various FLAGS variables.
4603
4604
4605
4606
4607
4608
4609#
4610# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4611# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4612#
4613# This code is free software; you can redistribute it and/or modify it
4614# under the terms of the GNU General Public License version 2 only, as
4615# published by the Free Software Foundation.  Oracle designates this
4616# particular file as subject to the "Classpath" exception as provided
4617# by Oracle in the LICENSE file that accompanied this code.
4618#
4619# This code is distributed in the hope that it will be useful, but WITHOUT
4620# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4621# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4622# version 2 for more details (a copy is included in the LICENSE file that
4623# accompanied this code).
4624#
4625# You should have received a copy of the GNU General Public License version
4626# 2 along with this work; if not, write to the Free Software Foundation,
4627# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4628#
4629# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4630# or visit www.oracle.com if you need additional information or have any
4631# questions.
4632#
4633
4634
4635
4636
4637
4638
4639
4640#
4641# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4642# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4643#
4644# This code is free software; you can redistribute it and/or modify it
4645# under the terms of the GNU General Public License version 2 only, as
4646# published by the Free Software Foundation.  Oracle designates this
4647# particular file as subject to the "Classpath" exception as provided
4648# by Oracle in the LICENSE file that accompanied this code.
4649#
4650# This code is distributed in the hope that it will be useful, but WITHOUT
4651# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4652# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4653# version 2 for more details (a copy is included in the LICENSE file that
4654# accompanied this code).
4655#
4656# You should have received a copy of the GNU General Public License version
4657# 2 along with this work; if not, write to the Free Software Foundation,
4658# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4659#
4660# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4661# or visit www.oracle.com if you need additional information or have any
4662# questions.
4663#
4664
4665########################################################################
4666# This file is responsible for detecting, verifying and setting up the
4667# toolchain, i.e. the compiler, linker and related utilities. It will setup
4668# proper paths to the binaries, but it will not setup any flags.
4669#
4670# The binaries used is determined by the toolchain type, which is the family of
4671# compilers and related tools that are used.
4672########################################################################
4673
4674
4675# All valid toolchains, regardless of platform (used by help.m4)
4676VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4677
4678# These toolchains are valid on different platforms
4679VALID_TOOLCHAINS_linux="gcc clang"
4680VALID_TOOLCHAINS_solaris="solstudio"
4681VALID_TOOLCHAINS_macosx="gcc clang"
4682VALID_TOOLCHAINS_aix="xlc"
4683VALID_TOOLCHAINS_windows="microsoft"
4684
4685# Toolchain descriptions
4686TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4687TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4688TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4689TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4690TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4691
4692# Setup a number of variables describing how native output files are
4693# named on this platform/toolchain.
4694
4695
4696# Determine which toolchain type to use, and make sure it is valid for this
4697# platform. Setup various information about the selected toolchain.
4698
4699
4700# Before we start detecting the toolchain executables, we might need some
4701# special setup, e.g. additional paths etc.
4702
4703
4704# Restore path, etc
4705
4706
4707# Check if a compiler is of the toolchain type we expect, and save the version
4708# information from it. If the compiler does not match the expected type,
4709# this function will abort using AC_MSG_ERROR. If it matches, the version will
4710# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4711# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4712#
4713# $1 = compiler to test (CC or CXX)
4714# $2 = human readable name of compiler (C or C++)
4715
4716
4717# Try to locate the given C or C++ compiler in the path, or otherwise.
4718#
4719# $1 = compiler to test (CC or CXX)
4720# $2 = human readable name of compiler (C or C++)
4721# $3 = list of compiler names to search for
4722
4723
4724# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4725# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4726# archiver (AR). Verify that the compilers are correct according to the
4727# toolchain type.
4728
4729
4730# Setup additional tools that is considered a part of the toolchain, but not the
4731# core part. Many of these are highly platform-specific and do not exist,
4732# and/or are not needed on all platforms.
4733
4734
4735# Setup the build tools (i.e, the compiler and linker used to build programs
4736# that should be run on the build platform, not the target platform, as a build
4737# helper). Since the non-cross-compile case uses the normal, target compilers
4738# for this, we can only do this after these have been setup.
4739
4740
4741# Setup legacy variables that are still needed as alternative ways to refer to
4742# parts of the toolchain.
4743
4744
4745# Do some additional checks on the detected tools.
4746
4747
4748# Setup the JTReg Regression Test Harness.
4749
4750
4751#
4752# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4754#
4755# This code is free software; you can redistribute it and/or modify it
4756# under the terms of the GNU General Public License version 2 only, as
4757# published by the Free Software Foundation.  Oracle designates this
4758# particular file as subject to the "Classpath" exception as provided
4759# by Oracle in the LICENSE file that accompanied this code.
4760#
4761# This code is distributed in the hope that it will be useful, but WITHOUT
4762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4764# version 2 for more details (a copy is included in the LICENSE file that
4765# accompanied this code).
4766#
4767# You should have received a copy of the GNU General Public License version
4768# 2 along with this work; if not, write to the Free Software Foundation,
4769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4770#
4771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4772# or visit www.oracle.com if you need additional information or have any
4773# questions.
4774#
4775
4776################################################################################
4777# The order of these defines the priority by which we try to find them.
4778VALID_VS_VERSIONS="2013 2012 2010"
4779
4780VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4781VS_VERSION_INTERNAL_2010=100
4782VS_MSVCR_2010=msvcr100.dll
4783# We don't use msvcp on Visual Studio 2010
4784#VS_MSVCP_2010=msvcp100.dll
4785VS_ENVVAR_2010="VS100COMNTOOLS"
4786VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4787VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4788VS_VS_PLATFORM_NAME_2010="v100"
4789VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4790
4791VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4792VS_VERSION_INTERNAL_2012=110
4793VS_MSVCR_2012=msvcr110.dll
4794VS_MSVCP_2012=msvcp110.dll
4795VS_ENVVAR_2012="VS110COMNTOOLS"
4796VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4797VS_SDK_INSTALLDIR_2012=
4798VS_VS_PLATFORM_NAME_2012="v110"
4799VS_SDK_PLATFORM_NAME_2012=
4800
4801VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4802VS_VERSION_INTERNAL_2013=120
4803VS_MSVCR_2013=msvcr120.dll
4804VS_MSVCP_2013=msvcp120.dll
4805VS_ENVVAR_2013="VS120COMNTOOLS"
4806VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4807VS_SDK_INSTALLDIR_2013=
4808VS_VS_PLATFORM_NAME_2013="v120"
4809VS_SDK_PLATFORM_NAME_2013=
4810
4811################################################################################
4812
4813
4814
4815################################################################################
4816
4817
4818
4819################################################################################
4820# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4821# build environment and assigns it to VS_ENV_CMD
4822
4823
4824################################################################################
4825
4826
4827
4828################################################################################
4829# Check if the VS env variables were setup prior to running configure.
4830# If not, then find vcvarsall.bat and run it automatically, and integrate
4831# the set env variables into the spec file.
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846# This line needs to be here, verbatim, after all includes and the dummy hook
4847# definitions. It is replaced with custom functionality when building
4848# custom sources.
4849#CUSTOM_AUTOCONF_INCLUDE
4850
4851# Do not change or remove the following line, it is needed for consistency checks:
4852DATE_WHEN_GENERATED=1453279620
4853
4854###############################################################################
4855#
4856# Initialization / Boot-strapping
4857#
4858# The bootstrapping process needs to solve the "chicken or the egg" problem,
4859# thus it jumps back and forth, each time gaining something needed later on.
4860#
4861###############################################################################
4862
4863# If we are requested to print additional help, do that and then exit.
4864# This must be the very first call.
4865
4866  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4867    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4868    $PRINTF "Which are valid to use depends on the build platform.\n"
4869    for toolchain in $VALID_TOOLCHAINS_all; do
4870      # Use indirect variable referencing
4871      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4872      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4873      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4874    done
4875
4876    # And now exit directly
4877    exit 0
4878  fi
4879
4880
4881# Basic initialization that must happen first of all in the normal process.
4882
4883  # Save the original command line. This is passed to us by the wrapper configure script.
4884
4885  # Save the path variable before it gets changed
4886  ORIGINAL_PATH="$PATH"
4887
4888  DATE_WHEN_CONFIGURED=`LANG=C date`
4889
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4891$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4892  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4893$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4894
4895
4896  # Start with tools that do not need have cross compilation support
4897  # and can be expected to be found in the default PATH. These tools are
4898  # used by configure.
4899
4900  # First are all the simple required tools.
4901
4902
4903
4904  # Publish this variable in the help.
4905
4906
4907  if [ -z "${BASENAME+x}" ]; then
4908    # The variable is not set by user, try to locate tool using the code snippet
4909    for ac_prog in basename
4910do
4911  # Extract the first word of "$ac_prog", so it can be a program name with args.
4912set dummy $ac_prog; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if ${ac_cv_path_BASENAME+:} false; then :
4916  $as_echo_n "(cached) " >&6
4917else
4918  case $BASENAME in
4919  [\\/]* | ?:[\\/]*)
4920  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4921  ;;
4922  *)
4923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924for as_dir in $PATH
4925do
4926  IFS=$as_save_IFS
4927  test -z "$as_dir" && as_dir=.
4928    for ac_exec_ext in '' $ac_executable_extensions; do
4929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4930    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932    break 2
4933  fi
4934done
4935  done
4936IFS=$as_save_IFS
4937
4938  ;;
4939esac
4940fi
4941BASENAME=$ac_cv_path_BASENAME
4942if test -n "$BASENAME"; then
4943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4944$as_echo "$BASENAME" >&6; }
4945else
4946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950
4951  test -n "$BASENAME" && break
4952done
4953
4954  else
4955    # The variable is set, but is it from the command line or the environment?
4956
4957    # Try to remove the string !BASENAME! from our list.
4958    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4959    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4960      # If it failed, the variable was not from the command line. Ignore it,
4961      # but warn the user (except for BASH, which is always set by the calling BASH).
4962      if test "xBASENAME" != xBASH; then
4963        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4964$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4965      fi
4966      # Try to locate tool using the code snippet
4967      for ac_prog in basename
4968do
4969  # Extract the first word of "$ac_prog", so it can be a program name with args.
4970set dummy $ac_prog; ac_word=$2
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
4973if ${ac_cv_path_BASENAME+:} false; then :
4974  $as_echo_n "(cached) " >&6
4975else
4976  case $BASENAME in
4977  [\\/]* | ?:[\\/]*)
4978  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4979  ;;
4980  *)
4981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in $PATH
4983do
4984  IFS=$as_save_IFS
4985  test -z "$as_dir" && as_dir=.
4986    for ac_exec_ext in '' $ac_executable_extensions; do
4987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4988    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990    break 2
4991  fi
4992done
4993  done
4994IFS=$as_save_IFS
4995
4996  ;;
4997esac
4998fi
4999BASENAME=$ac_cv_path_BASENAME
5000if test -n "$BASENAME"; then
5001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5002$as_echo "$BASENAME" >&6; }
5003else
5004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006fi
5007
5008
5009  test -n "$BASENAME" && break
5010done
5011
5012    else
5013      # If it succeeded, then it was overridden by the user. We will use it
5014      # for the tool.
5015
5016      # First remove it from the list of overridden variables, so we can test
5017      # for unknown variables in the end.
5018      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5019
5020      # Check if we try to supply an empty value
5021      if test "x$BASENAME" = x; then
5022        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5023$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5024        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5025$as_echo_n "checking for BASENAME... " >&6; }
5026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5027$as_echo "disabled" >&6; }
5028      else
5029        # Check if the provided tool contains a complete path.
5030        tool_specified="$BASENAME"
5031        tool_basename="${tool_specified##*/}"
5032        if test "x$tool_basename" = "x$tool_specified"; then
5033          # A command without a complete path is provided, search $PATH.
5034          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5035$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5036          # Extract the first word of "$tool_basename", so it can be a program name with args.
5037set dummy $tool_basename; ac_word=$2
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
5040if ${ac_cv_path_BASENAME+:} false; then :
5041  $as_echo_n "(cached) " >&6
5042else
5043  case $BASENAME in
5044  [\\/]* | ?:[\\/]*)
5045  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5046  ;;
5047  *)
5048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in $PATH
5050do
5051  IFS=$as_save_IFS
5052  test -z "$as_dir" && as_dir=.
5053    for ac_exec_ext in '' $ac_executable_extensions; do
5054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057    break 2
5058  fi
5059done
5060  done
5061IFS=$as_save_IFS
5062
5063  ;;
5064esac
5065fi
5066BASENAME=$ac_cv_path_BASENAME
5067if test -n "$BASENAME"; then
5068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5069$as_echo "$BASENAME" >&6; }
5070else
5071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
5073fi
5074
5075
5076          if test "x$BASENAME" = x; then
5077            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5078          fi
5079        else
5080          # Otherwise we believe it is a complete path. Use it as it is.
5081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5082$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5083          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5084$as_echo_n "checking for BASENAME... " >&6; }
5085          if test ! -x "$tool_specified"; then
5086            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5087$as_echo "not found" >&6; }
5088            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5089          fi
5090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5091$as_echo "$tool_specified" >&6; }
5092        fi
5093      fi
5094    fi
5095
5096  fi
5097
5098
5099
5100  if test "x$BASENAME" = x; then
5101    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5102  fi
5103
5104
5105
5106
5107
5108  # Publish this variable in the help.
5109
5110
5111  if [ -z "${BASH+x}" ]; then
5112    # The variable is not set by user, try to locate tool using the code snippet
5113    for ac_prog in bash
5114do
5115  # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
5119if ${ac_cv_path_BASH+:} false; then :
5120  $as_echo_n "(cached) " >&6
5121else
5122  case $BASH in
5123  [\\/]* | ?:[\\/]*)
5124  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5125  ;;
5126  *)
5127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5128for as_dir in $PATH
5129do
5130  IFS=$as_save_IFS
5131  test -z "$as_dir" && as_dir=.
5132    for ac_exec_ext in '' $ac_executable_extensions; do
5133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5134    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5136    break 2
5137  fi
5138done
5139  done
5140IFS=$as_save_IFS
5141
5142  ;;
5143esac
5144fi
5145BASH=$ac_cv_path_BASH
5146if test -n "$BASH"; then
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5148$as_echo "$BASH" >&6; }
5149else
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151$as_echo "no" >&6; }
5152fi
5153
5154
5155  test -n "$BASH" && break
5156done
5157
5158  else
5159    # The variable is set, but is it from the command line or the environment?
5160
5161    # Try to remove the string !BASH! from our list.
5162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5164      # If it failed, the variable was not from the command line. Ignore it,
5165      # but warn the user (except for BASH, which is always set by the calling BASH).
5166      if test "xBASH" != xBASH; then
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5168$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5169      fi
5170      # Try to locate tool using the code snippet
5171      for ac_prog in bash
5172do
5173  # Extract the first word of "$ac_prog", so it can be a program name with args.
5174set dummy $ac_prog; ac_word=$2
5175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5176$as_echo_n "checking for $ac_word... " >&6; }
5177if ${ac_cv_path_BASH+:} false; then :
5178  $as_echo_n "(cached) " >&6
5179else
5180  case $BASH in
5181  [\\/]* | ?:[\\/]*)
5182  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5183  ;;
5184  *)
5185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5186for as_dir in $PATH
5187do
5188  IFS=$as_save_IFS
5189  test -z "$as_dir" && as_dir=.
5190    for ac_exec_ext in '' $ac_executable_extensions; do
5191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5192    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5194    break 2
5195  fi
5196done
5197  done
5198IFS=$as_save_IFS
5199
5200  ;;
5201esac
5202fi
5203BASH=$ac_cv_path_BASH
5204if test -n "$BASH"; then
5205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5206$as_echo "$BASH" >&6; }
5207else
5208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5209$as_echo "no" >&6; }
5210fi
5211
5212
5213  test -n "$BASH" && break
5214done
5215
5216    else
5217      # If it succeeded, then it was overridden by the user. We will use it
5218      # for the tool.
5219
5220      # First remove it from the list of overridden variables, so we can test
5221      # for unknown variables in the end.
5222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5223
5224      # Check if we try to supply an empty value
5225      if test "x$BASH" = x; then
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5227$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5229$as_echo_n "checking for BASH... " >&6; }
5230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5231$as_echo "disabled" >&6; }
5232      else
5233        # Check if the provided tool contains a complete path.
5234        tool_specified="$BASH"
5235        tool_basename="${tool_specified##*/}"
5236        if test "x$tool_basename" = "x$tool_specified"; then
5237          # A command without a complete path is provided, search $PATH.
5238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5239$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5240          # Extract the first word of "$tool_basename", so it can be a program name with args.
5241set dummy $tool_basename; ac_word=$2
5242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5243$as_echo_n "checking for $ac_word... " >&6; }
5244if ${ac_cv_path_BASH+:} false; then :
5245  $as_echo_n "(cached) " >&6
5246else
5247  case $BASH in
5248  [\\/]* | ?:[\\/]*)
5249  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5250  ;;
5251  *)
5252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5253for as_dir in $PATH
5254do
5255  IFS=$as_save_IFS
5256  test -z "$as_dir" && as_dir=.
5257    for ac_exec_ext in '' $ac_executable_extensions; do
5258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5259    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5261    break 2
5262  fi
5263done
5264  done
5265IFS=$as_save_IFS
5266
5267  ;;
5268esac
5269fi
5270BASH=$ac_cv_path_BASH
5271if test -n "$BASH"; then
5272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5273$as_echo "$BASH" >&6; }
5274else
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5276$as_echo "no" >&6; }
5277fi
5278
5279
5280          if test "x$BASH" = x; then
5281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5282          fi
5283        else
5284          # Otherwise we believe it is a complete path. Use it as it is.
5285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5286$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5288$as_echo_n "checking for BASH... " >&6; }
5289          if test ! -x "$tool_specified"; then
5290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5291$as_echo "not found" >&6; }
5292            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5293          fi
5294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5295$as_echo "$tool_specified" >&6; }
5296        fi
5297      fi
5298    fi
5299
5300  fi
5301
5302
5303
5304  if test "x$BASH" = x; then
5305    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5306  fi
5307
5308
5309
5310
5311
5312  # Publish this variable in the help.
5313
5314
5315  if [ -z "${CAT+x}" ]; then
5316    # The variable is not set by user, try to locate tool using the code snippet
5317    for ac_prog in cat
5318do
5319  # Extract the first word of "$ac_prog", so it can be a program name with args.
5320set dummy $ac_prog; ac_word=$2
5321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5322$as_echo_n "checking for $ac_word... " >&6; }
5323if ${ac_cv_path_CAT+:} false; then :
5324  $as_echo_n "(cached) " >&6
5325else
5326  case $CAT in
5327  [\\/]* | ?:[\\/]*)
5328  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5329  ;;
5330  *)
5331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5332for as_dir in $PATH
5333do
5334  IFS=$as_save_IFS
5335  test -z "$as_dir" && as_dir=.
5336    for ac_exec_ext in '' $ac_executable_extensions; do
5337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5338    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5340    break 2
5341  fi
5342done
5343  done
5344IFS=$as_save_IFS
5345
5346  ;;
5347esac
5348fi
5349CAT=$ac_cv_path_CAT
5350if test -n "$CAT"; then
5351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5352$as_echo "$CAT" >&6; }
5353else
5354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5355$as_echo "no" >&6; }
5356fi
5357
5358
5359  test -n "$CAT" && break
5360done
5361
5362  else
5363    # The variable is set, but is it from the command line or the environment?
5364
5365    # Try to remove the string !CAT! from our list.
5366    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5367    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5368      # If it failed, the variable was not from the command line. Ignore it,
5369      # but warn the user (except for BASH, which is always set by the calling BASH).
5370      if test "xCAT" != xBASH; then
5371        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5372$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5373      fi
5374      # Try to locate tool using the code snippet
5375      for ac_prog in cat
5376do
5377  # Extract the first word of "$ac_prog", so it can be a program name with args.
5378set dummy $ac_prog; ac_word=$2
5379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5380$as_echo_n "checking for $ac_word... " >&6; }
5381if ${ac_cv_path_CAT+:} false; then :
5382  $as_echo_n "(cached) " >&6
5383else
5384  case $CAT in
5385  [\\/]* | ?:[\\/]*)
5386  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5387  ;;
5388  *)
5389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5390for as_dir in $PATH
5391do
5392  IFS=$as_save_IFS
5393  test -z "$as_dir" && as_dir=.
5394    for ac_exec_ext in '' $ac_executable_extensions; do
5395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5396    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5398    break 2
5399  fi
5400done
5401  done
5402IFS=$as_save_IFS
5403
5404  ;;
5405esac
5406fi
5407CAT=$ac_cv_path_CAT
5408if test -n "$CAT"; then
5409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5410$as_echo "$CAT" >&6; }
5411else
5412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5413$as_echo "no" >&6; }
5414fi
5415
5416
5417  test -n "$CAT" && break
5418done
5419
5420    else
5421      # If it succeeded, then it was overridden by the user. We will use it
5422      # for the tool.
5423
5424      # First remove it from the list of overridden variables, so we can test
5425      # for unknown variables in the end.
5426      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5427
5428      # Check if we try to supply an empty value
5429      if test "x$CAT" = x; then
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5431$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5432        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5433$as_echo_n "checking for CAT... " >&6; }
5434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5435$as_echo "disabled" >&6; }
5436      else
5437        # Check if the provided tool contains a complete path.
5438        tool_specified="$CAT"
5439        tool_basename="${tool_specified##*/}"
5440        if test "x$tool_basename" = "x$tool_specified"; then
5441          # A command without a complete path is provided, search $PATH.
5442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5443$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5444          # Extract the first word of "$tool_basename", so it can be a program name with args.
5445set dummy $tool_basename; ac_word=$2
5446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5447$as_echo_n "checking for $ac_word... " >&6; }
5448if ${ac_cv_path_CAT+:} false; then :
5449  $as_echo_n "(cached) " >&6
5450else
5451  case $CAT in
5452  [\\/]* | ?:[\\/]*)
5453  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5454  ;;
5455  *)
5456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5457for as_dir in $PATH
5458do
5459  IFS=$as_save_IFS
5460  test -z "$as_dir" && as_dir=.
5461    for ac_exec_ext in '' $ac_executable_extensions; do
5462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5463    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5465    break 2
5466  fi
5467done
5468  done
5469IFS=$as_save_IFS
5470
5471  ;;
5472esac
5473fi
5474CAT=$ac_cv_path_CAT
5475if test -n "$CAT"; then
5476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5477$as_echo "$CAT" >&6; }
5478else
5479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5480$as_echo "no" >&6; }
5481fi
5482
5483
5484          if test "x$CAT" = x; then
5485            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5486          fi
5487        else
5488          # Otherwise we believe it is a complete path. Use it as it is.
5489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5490$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5491          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5492$as_echo_n "checking for CAT... " >&6; }
5493          if test ! -x "$tool_specified"; then
5494            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5495$as_echo "not found" >&6; }
5496            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5497          fi
5498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5499$as_echo "$tool_specified" >&6; }
5500        fi
5501      fi
5502    fi
5503
5504  fi
5505
5506
5507
5508  if test "x$CAT" = x; then
5509    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5510  fi
5511
5512
5513
5514
5515
5516  # Publish this variable in the help.
5517
5518
5519  if [ -z "${CHMOD+x}" ]; then
5520    # The variable is not set by user, try to locate tool using the code snippet
5521    for ac_prog in chmod
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_CHMOD+:} false; then :
5528  $as_echo_n "(cached) " >&6
5529else
5530  case $CHMOD in
5531  [\\/]* | ?:[\\/]*)
5532  ac_cv_path_CHMOD="$CHMOD" # 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_CHMOD="$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
5553CHMOD=$ac_cv_path_CHMOD
5554if test -n "$CHMOD"; then
5555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5556$as_echo "$CHMOD" >&6; }
5557else
5558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5559$as_echo "no" >&6; }
5560fi
5561
5562
5563  test -n "$CHMOD" && break
5564done
5565
5566  else
5567    # The variable is set, but is it from the command line or the environment?
5568
5569    # Try to remove the string !CHMOD! from our list.
5570    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5571    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5572      # If it failed, the variable was not from the command line. Ignore it,
5573      # but warn the user (except for BASH, which is always set by the calling BASH).
5574      if test "xCHMOD" != xBASH; then
5575        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5576$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5577      fi
5578      # Try to locate tool using the code snippet
5579      for ac_prog in chmod
5580do
5581  # Extract the first word of "$ac_prog", so it can be a program name with args.
5582set dummy $ac_prog; 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_CHMOD+:} false; then :
5586  $as_echo_n "(cached) " >&6
5587else
5588  case $CHMOD in
5589  [\\/]* | ?:[\\/]*)
5590  ac_cv_path_CHMOD="$CHMOD" # 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_CHMOD="$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
5611CHMOD=$ac_cv_path_CHMOD
5612if test -n "$CHMOD"; then
5613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5614$as_echo "$CHMOD" >&6; }
5615else
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5617$as_echo "no" >&6; }
5618fi
5619
5620
5621  test -n "$CHMOD" && break
5622done
5623
5624    else
5625      # If it succeeded, then it was overridden by the user. We will use it
5626      # for the tool.
5627
5628      # First remove it from the list of overridden variables, so we can test
5629      # for unknown variables in the end.
5630      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5631
5632      # Check if we try to supply an empty value
5633      if test "x$CHMOD" = x; then
5634        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5635$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5637$as_echo_n "checking for CHMOD... " >&6; }
5638        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5639$as_echo "disabled" >&6; }
5640      else
5641        # Check if the provided tool contains a complete path.
5642        tool_specified="$CHMOD"
5643        tool_basename="${tool_specified##*/}"
5644        if test "x$tool_basename" = "x$tool_specified"; then
5645          # A command without a complete path is provided, search $PATH.
5646          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5647$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5648          # Extract the first word of "$tool_basename", so it can be a program name with args.
5649set dummy $tool_basename; ac_word=$2
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
5652if ${ac_cv_path_CHMOD+:} false; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  case $CHMOD in
5656  [\\/]* | ?:[\\/]*)
5657  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5658  ;;
5659  *)
5660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5667    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675  ;;
5676esac
5677fi
5678CHMOD=$ac_cv_path_CHMOD
5679if test -n "$CHMOD"; then
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5681$as_echo "$CHMOD" >&6; }
5682else
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685fi
5686
5687
5688          if test "x$CHMOD" = x; then
5689            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5690          fi
5691        else
5692          # Otherwise we believe it is a complete path. Use it as it is.
5693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5694$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5695          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5696$as_echo_n "checking for CHMOD... " >&6; }
5697          if test ! -x "$tool_specified"; then
5698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5699$as_echo "not found" >&6; }
5700            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5701          fi
5702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5703$as_echo "$tool_specified" >&6; }
5704        fi
5705      fi
5706    fi
5707
5708  fi
5709
5710
5711
5712  if test "x$CHMOD" = x; then
5713    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5714  fi
5715
5716
5717
5718
5719
5720  # Publish this variable in the help.
5721
5722
5723  if [ -z "${CMP+x}" ]; then
5724    # The variable is not set by user, try to locate tool using the code snippet
5725    for ac_prog in cmp
5726do
5727  # Extract the first word of "$ac_prog", so it can be a program name with args.
5728set dummy $ac_prog; ac_word=$2
5729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5730$as_echo_n "checking for $ac_word... " >&6; }
5731if ${ac_cv_path_CMP+:} false; then :
5732  $as_echo_n "(cached) " >&6
5733else
5734  case $CMP in
5735  [\\/]* | ?:[\\/]*)
5736  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5737  ;;
5738  *)
5739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5740for as_dir in $PATH
5741do
5742  IFS=$as_save_IFS
5743  test -z "$as_dir" && as_dir=.
5744    for ac_exec_ext in '' $ac_executable_extensions; do
5745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5746    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5748    break 2
5749  fi
5750done
5751  done
5752IFS=$as_save_IFS
5753
5754  ;;
5755esac
5756fi
5757CMP=$ac_cv_path_CMP
5758if test -n "$CMP"; then
5759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5760$as_echo "$CMP" >&6; }
5761else
5762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5763$as_echo "no" >&6; }
5764fi
5765
5766
5767  test -n "$CMP" && break
5768done
5769
5770  else
5771    # The variable is set, but is it from the command line or the environment?
5772
5773    # Try to remove the string !CMP! from our list.
5774    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5775    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5776      # If it failed, the variable was not from the command line. Ignore it,
5777      # but warn the user (except for BASH, which is always set by the calling BASH).
5778      if test "xCMP" != xBASH; then
5779        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5780$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5781      fi
5782      # Try to locate tool using the code snippet
5783      for ac_prog in cmp
5784do
5785  # Extract the first word of "$ac_prog", so it can be a program name with args.
5786set dummy $ac_prog; ac_word=$2
5787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5788$as_echo_n "checking for $ac_word... " >&6; }
5789if ${ac_cv_path_CMP+:} false; then :
5790  $as_echo_n "(cached) " >&6
5791else
5792  case $CMP in
5793  [\\/]* | ?:[\\/]*)
5794  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5795  ;;
5796  *)
5797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5798for as_dir in $PATH
5799do
5800  IFS=$as_save_IFS
5801  test -z "$as_dir" && as_dir=.
5802    for ac_exec_ext in '' $ac_executable_extensions; do
5803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5804    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5806    break 2
5807  fi
5808done
5809  done
5810IFS=$as_save_IFS
5811
5812  ;;
5813esac
5814fi
5815CMP=$ac_cv_path_CMP
5816if test -n "$CMP"; then
5817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5818$as_echo "$CMP" >&6; }
5819else
5820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5821$as_echo "no" >&6; }
5822fi
5823
5824
5825  test -n "$CMP" && break
5826done
5827
5828    else
5829      # If it succeeded, then it was overridden by the user. We will use it
5830      # for the tool.
5831
5832      # First remove it from the list of overridden variables, so we can test
5833      # for unknown variables in the end.
5834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5835
5836      # Check if we try to supply an empty value
5837      if test "x$CMP" = x; then
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5839$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5841$as_echo_n "checking for CMP... " >&6; }
5842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5843$as_echo "disabled" >&6; }
5844      else
5845        # Check if the provided tool contains a complete path.
5846        tool_specified="$CMP"
5847        tool_basename="${tool_specified##*/}"
5848        if test "x$tool_basename" = "x$tool_specified"; then
5849          # A command without a complete path is provided, search $PATH.
5850          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5851$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5852          # Extract the first word of "$tool_basename", so it can be a program name with args.
5853set dummy $tool_basename; ac_word=$2
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855$as_echo_n "checking for $ac_word... " >&6; }
5856if ${ac_cv_path_CMP+:} false; then :
5857  $as_echo_n "(cached) " >&6
5858else
5859  case $CMP in
5860  [\\/]* | ?:[\\/]*)
5861  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5862  ;;
5863  *)
5864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5865for as_dir in $PATH
5866do
5867  IFS=$as_save_IFS
5868  test -z "$as_dir" && as_dir=.
5869    for ac_exec_ext in '' $ac_executable_extensions; do
5870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5871    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5873    break 2
5874  fi
5875done
5876  done
5877IFS=$as_save_IFS
5878
5879  ;;
5880esac
5881fi
5882CMP=$ac_cv_path_CMP
5883if test -n "$CMP"; then
5884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5885$as_echo "$CMP" >&6; }
5886else
5887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888$as_echo "no" >&6; }
5889fi
5890
5891
5892          if test "x$CMP" = x; then
5893            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5894          fi
5895        else
5896          # Otherwise we believe it is a complete path. Use it as it is.
5897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5898$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5899          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5900$as_echo_n "checking for CMP... " >&6; }
5901          if test ! -x "$tool_specified"; then
5902            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5903$as_echo "not found" >&6; }
5904            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5905          fi
5906          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5907$as_echo "$tool_specified" >&6; }
5908        fi
5909      fi
5910    fi
5911
5912  fi
5913
5914
5915
5916  if test "x$CMP" = x; then
5917    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5918  fi
5919
5920
5921
5922
5923
5924  # Publish this variable in the help.
5925
5926
5927  if [ -z "${COMM+x}" ]; then
5928    # The variable is not set by user, try to locate tool using the code snippet
5929    for ac_prog in comm
5930do
5931  # Extract the first word of "$ac_prog", so it can be a program name with args.
5932set dummy $ac_prog; ac_word=$2
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5934$as_echo_n "checking for $ac_word... " >&6; }
5935if ${ac_cv_path_COMM+:} false; then :
5936  $as_echo_n "(cached) " >&6
5937else
5938  case $COMM in
5939  [\\/]* | ?:[\\/]*)
5940  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5941  ;;
5942  *)
5943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5944for as_dir in $PATH
5945do
5946  IFS=$as_save_IFS
5947  test -z "$as_dir" && as_dir=.
5948    for ac_exec_ext in '' $ac_executable_extensions; do
5949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5950    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5952    break 2
5953  fi
5954done
5955  done
5956IFS=$as_save_IFS
5957
5958  ;;
5959esac
5960fi
5961COMM=$ac_cv_path_COMM
5962if test -n "$COMM"; then
5963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5964$as_echo "$COMM" >&6; }
5965else
5966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5967$as_echo "no" >&6; }
5968fi
5969
5970
5971  test -n "$COMM" && break
5972done
5973
5974  else
5975    # The variable is set, but is it from the command line or the environment?
5976
5977    # Try to remove the string !COMM! from our list.
5978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5980      # If it failed, the variable was not from the command line. Ignore it,
5981      # but warn the user (except for BASH, which is always set by the calling BASH).
5982      if test "xCOMM" != xBASH; then
5983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5984$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5985      fi
5986      # Try to locate tool using the code snippet
5987      for ac_prog in comm
5988do
5989  # Extract the first word of "$ac_prog", so it can be a program name with args.
5990set dummy $ac_prog; ac_word=$2
5991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5992$as_echo_n "checking for $ac_word... " >&6; }
5993if ${ac_cv_path_COMM+:} false; then :
5994  $as_echo_n "(cached) " >&6
5995else
5996  case $COMM in
5997  [\\/]* | ?:[\\/]*)
5998  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5999  ;;
6000  *)
6001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6002for as_dir in $PATH
6003do
6004  IFS=$as_save_IFS
6005  test -z "$as_dir" && as_dir=.
6006    for ac_exec_ext in '' $ac_executable_extensions; do
6007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6008    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6010    break 2
6011  fi
6012done
6013  done
6014IFS=$as_save_IFS
6015
6016  ;;
6017esac
6018fi
6019COMM=$ac_cv_path_COMM
6020if test -n "$COMM"; then
6021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6022$as_echo "$COMM" >&6; }
6023else
6024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6025$as_echo "no" >&6; }
6026fi
6027
6028
6029  test -n "$COMM" && break
6030done
6031
6032    else
6033      # If it succeeded, then it was overridden by the user. We will use it
6034      # for the tool.
6035
6036      # First remove it from the list of overridden variables, so we can test
6037      # for unknown variables in the end.
6038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6039
6040      # Check if we try to supply an empty value
6041      if test "x$COMM" = x; then
6042        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6043$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6045$as_echo_n "checking for COMM... " >&6; }
6046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6047$as_echo "disabled" >&6; }
6048      else
6049        # Check if the provided tool contains a complete path.
6050        tool_specified="$COMM"
6051        tool_basename="${tool_specified##*/}"
6052        if test "x$tool_basename" = "x$tool_specified"; then
6053          # A command without a complete path is provided, search $PATH.
6054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6055$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6056          # Extract the first word of "$tool_basename", so it can be a program name with args.
6057set dummy $tool_basename; ac_word=$2
6058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6059$as_echo_n "checking for $ac_word... " >&6; }
6060if ${ac_cv_path_COMM+:} false; then :
6061  $as_echo_n "(cached) " >&6
6062else
6063  case $COMM in
6064  [\\/]* | ?:[\\/]*)
6065  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6066  ;;
6067  *)
6068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6069for as_dir in $PATH
6070do
6071  IFS=$as_save_IFS
6072  test -z "$as_dir" && as_dir=.
6073    for ac_exec_ext in '' $ac_executable_extensions; do
6074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6075    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6077    break 2
6078  fi
6079done
6080  done
6081IFS=$as_save_IFS
6082
6083  ;;
6084esac
6085fi
6086COMM=$ac_cv_path_COMM
6087if test -n "$COMM"; then
6088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6089$as_echo "$COMM" >&6; }
6090else
6091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6092$as_echo "no" >&6; }
6093fi
6094
6095
6096          if test "x$COMM" = x; then
6097            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6098          fi
6099        else
6100          # Otherwise we believe it is a complete path. Use it as it is.
6101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6102$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6103          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6104$as_echo_n "checking for COMM... " >&6; }
6105          if test ! -x "$tool_specified"; then
6106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6107$as_echo "not found" >&6; }
6108            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6109          fi
6110          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6111$as_echo "$tool_specified" >&6; }
6112        fi
6113      fi
6114    fi
6115
6116  fi
6117
6118
6119
6120  if test "x$COMM" = x; then
6121    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6122  fi
6123
6124
6125
6126
6127
6128  # Publish this variable in the help.
6129
6130
6131  if [ -z "${CP+x}" ]; then
6132    # The variable is not set by user, try to locate tool using the code snippet
6133    for ac_prog in cp
6134do
6135  # Extract the first word of "$ac_prog", so it can be a program name with args.
6136set dummy $ac_prog; ac_word=$2
6137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6138$as_echo_n "checking for $ac_word... " >&6; }
6139if ${ac_cv_path_CP+:} false; then :
6140  $as_echo_n "(cached) " >&6
6141else
6142  case $CP in
6143  [\\/]* | ?:[\\/]*)
6144  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6145  ;;
6146  *)
6147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150  IFS=$as_save_IFS
6151  test -z "$as_dir" && as_dir=.
6152    for ac_exec_ext in '' $ac_executable_extensions; do
6153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6154    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6156    break 2
6157  fi
6158done
6159  done
6160IFS=$as_save_IFS
6161
6162  ;;
6163esac
6164fi
6165CP=$ac_cv_path_CP
6166if test -n "$CP"; then
6167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6168$as_echo "$CP" >&6; }
6169else
6170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6171$as_echo "no" >&6; }
6172fi
6173
6174
6175  test -n "$CP" && break
6176done
6177
6178  else
6179    # The variable is set, but is it from the command line or the environment?
6180
6181    # Try to remove the string !CP! from our list.
6182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6184      # If it failed, the variable was not from the command line. Ignore it,
6185      # but warn the user (except for BASH, which is always set by the calling BASH).
6186      if test "xCP" != xBASH; then
6187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6188$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6189      fi
6190      # Try to locate tool using the code snippet
6191      for ac_prog in cp
6192do
6193  # Extract the first word of "$ac_prog", so it can be a program name with args.
6194set dummy $ac_prog; ac_word=$2
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6196$as_echo_n "checking for $ac_word... " >&6; }
6197if ${ac_cv_path_CP+:} false; then :
6198  $as_echo_n "(cached) " >&6
6199else
6200  case $CP in
6201  [\\/]* | ?:[\\/]*)
6202  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6203  ;;
6204  *)
6205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH
6207do
6208  IFS=$as_save_IFS
6209  test -z "$as_dir" && as_dir=.
6210    for ac_exec_ext in '' $ac_executable_extensions; do
6211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6212    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214    break 2
6215  fi
6216done
6217  done
6218IFS=$as_save_IFS
6219
6220  ;;
6221esac
6222fi
6223CP=$ac_cv_path_CP
6224if test -n "$CP"; then
6225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6226$as_echo "$CP" >&6; }
6227else
6228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229$as_echo "no" >&6; }
6230fi
6231
6232
6233  test -n "$CP" && break
6234done
6235
6236    else
6237      # If it succeeded, then it was overridden by the user. We will use it
6238      # for the tool.
6239
6240      # First remove it from the list of overridden variables, so we can test
6241      # for unknown variables in the end.
6242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6243
6244      # Check if we try to supply an empty value
6245      if test "x$CP" = x; then
6246        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6247$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6249$as_echo_n "checking for CP... " >&6; }
6250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6251$as_echo "disabled" >&6; }
6252      else
6253        # Check if the provided tool contains a complete path.
6254        tool_specified="$CP"
6255        tool_basename="${tool_specified##*/}"
6256        if test "x$tool_basename" = "x$tool_specified"; then
6257          # A command without a complete path is provided, search $PATH.
6258          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6259$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6260          # Extract the first word of "$tool_basename", so it can be a program name with args.
6261set dummy $tool_basename; ac_word=$2
6262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6263$as_echo_n "checking for $ac_word... " >&6; }
6264if ${ac_cv_path_CP+:} false; then :
6265  $as_echo_n "(cached) " >&6
6266else
6267  case $CP in
6268  [\\/]* | ?:[\\/]*)
6269  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6270  ;;
6271  *)
6272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273for as_dir in $PATH
6274do
6275  IFS=$as_save_IFS
6276  test -z "$as_dir" && as_dir=.
6277    for ac_exec_ext in '' $ac_executable_extensions; do
6278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6279    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6281    break 2
6282  fi
6283done
6284  done
6285IFS=$as_save_IFS
6286
6287  ;;
6288esac
6289fi
6290CP=$ac_cv_path_CP
6291if test -n "$CP"; then
6292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6293$as_echo "$CP" >&6; }
6294else
6295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6296$as_echo "no" >&6; }
6297fi
6298
6299
6300          if test "x$CP" = x; then
6301            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6302          fi
6303        else
6304          # Otherwise we believe it is a complete path. Use it as it is.
6305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6306$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6307          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6308$as_echo_n "checking for CP... " >&6; }
6309          if test ! -x "$tool_specified"; then
6310            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6311$as_echo "not found" >&6; }
6312            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6313          fi
6314          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6315$as_echo "$tool_specified" >&6; }
6316        fi
6317      fi
6318    fi
6319
6320  fi
6321
6322
6323
6324  if test "x$CP" = x; then
6325    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6326  fi
6327
6328
6329
6330
6331
6332  # Publish this variable in the help.
6333
6334
6335  if [ -z "${CUT+x}" ]; then
6336    # The variable is not set by user, try to locate tool using the code snippet
6337    for ac_prog in cut
6338do
6339  # Extract the first word of "$ac_prog", so it can be a program name with args.
6340set dummy $ac_prog; ac_word=$2
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6342$as_echo_n "checking for $ac_word... " >&6; }
6343if ${ac_cv_path_CUT+:} false; then :
6344  $as_echo_n "(cached) " >&6
6345else
6346  case $CUT in
6347  [\\/]* | ?:[\\/]*)
6348  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6349  ;;
6350  *)
6351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6352for as_dir in $PATH
6353do
6354  IFS=$as_save_IFS
6355  test -z "$as_dir" && as_dir=.
6356    for ac_exec_ext in '' $ac_executable_extensions; do
6357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6358    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6360    break 2
6361  fi
6362done
6363  done
6364IFS=$as_save_IFS
6365
6366  ;;
6367esac
6368fi
6369CUT=$ac_cv_path_CUT
6370if test -n "$CUT"; then
6371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6372$as_echo "$CUT" >&6; }
6373else
6374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6375$as_echo "no" >&6; }
6376fi
6377
6378
6379  test -n "$CUT" && break
6380done
6381
6382  else
6383    # The variable is set, but is it from the command line or the environment?
6384
6385    # Try to remove the string !CUT! from our list.
6386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6388      # If it failed, the variable was not from the command line. Ignore it,
6389      # but warn the user (except for BASH, which is always set by the calling BASH).
6390      if test "xCUT" != xBASH; then
6391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6392$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6393      fi
6394      # Try to locate tool using the code snippet
6395      for ac_prog in cut
6396do
6397  # Extract the first word of "$ac_prog", so it can be a program name with args.
6398set dummy $ac_prog; ac_word=$2
6399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6400$as_echo_n "checking for $ac_word... " >&6; }
6401if ${ac_cv_path_CUT+:} false; then :
6402  $as_echo_n "(cached) " >&6
6403else
6404  case $CUT in
6405  [\\/]* | ?:[\\/]*)
6406  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6407  ;;
6408  *)
6409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6410for as_dir in $PATH
6411do
6412  IFS=$as_save_IFS
6413  test -z "$as_dir" && as_dir=.
6414    for ac_exec_ext in '' $ac_executable_extensions; do
6415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6416    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6418    break 2
6419  fi
6420done
6421  done
6422IFS=$as_save_IFS
6423
6424  ;;
6425esac
6426fi
6427CUT=$ac_cv_path_CUT
6428if test -n "$CUT"; then
6429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6430$as_echo "$CUT" >&6; }
6431else
6432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433$as_echo "no" >&6; }
6434fi
6435
6436
6437  test -n "$CUT" && break
6438done
6439
6440    else
6441      # If it succeeded, then it was overridden by the user. We will use it
6442      # for the tool.
6443
6444      # First remove it from the list of overridden variables, so we can test
6445      # for unknown variables in the end.
6446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6447
6448      # Check if we try to supply an empty value
6449      if test "x$CUT" = x; then
6450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6451$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6453$as_echo_n "checking for CUT... " >&6; }
6454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6455$as_echo "disabled" >&6; }
6456      else
6457        # Check if the provided tool contains a complete path.
6458        tool_specified="$CUT"
6459        tool_basename="${tool_specified##*/}"
6460        if test "x$tool_basename" = "x$tool_specified"; then
6461          # A command without a complete path is provided, search $PATH.
6462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6463$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6464          # Extract the first word of "$tool_basename", so it can be a program name with args.
6465set dummy $tool_basename; ac_word=$2
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6467$as_echo_n "checking for $ac_word... " >&6; }
6468if ${ac_cv_path_CUT+:} false; then :
6469  $as_echo_n "(cached) " >&6
6470else
6471  case $CUT in
6472  [\\/]* | ?:[\\/]*)
6473  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6474  ;;
6475  *)
6476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6477for as_dir in $PATH
6478do
6479  IFS=$as_save_IFS
6480  test -z "$as_dir" && as_dir=.
6481    for ac_exec_ext in '' $ac_executable_extensions; do
6482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6483    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6485    break 2
6486  fi
6487done
6488  done
6489IFS=$as_save_IFS
6490
6491  ;;
6492esac
6493fi
6494CUT=$ac_cv_path_CUT
6495if test -n "$CUT"; then
6496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6497$as_echo "$CUT" >&6; }
6498else
6499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6500$as_echo "no" >&6; }
6501fi
6502
6503
6504          if test "x$CUT" = x; then
6505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6506          fi
6507        else
6508          # Otherwise we believe it is a complete path. Use it as it is.
6509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6510$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6512$as_echo_n "checking for CUT... " >&6; }
6513          if test ! -x "$tool_specified"; then
6514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6515$as_echo "not found" >&6; }
6516            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6517          fi
6518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6519$as_echo "$tool_specified" >&6; }
6520        fi
6521      fi
6522    fi
6523
6524  fi
6525
6526
6527
6528  if test "x$CUT" = x; then
6529    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6530  fi
6531
6532
6533
6534
6535
6536  # Publish this variable in the help.
6537
6538
6539  if [ -z "${DATE+x}" ]; then
6540    # The variable is not set by user, try to locate tool using the code snippet
6541    for ac_prog in date
6542do
6543  # Extract the first word of "$ac_prog", so it can be a program name with args.
6544set dummy $ac_prog; ac_word=$2
6545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546$as_echo_n "checking for $ac_word... " >&6; }
6547if ${ac_cv_path_DATE+:} false; then :
6548  $as_echo_n "(cached) " >&6
6549else
6550  case $DATE in
6551  [\\/]* | ?:[\\/]*)
6552  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6553  ;;
6554  *)
6555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556for as_dir in $PATH
6557do
6558  IFS=$as_save_IFS
6559  test -z "$as_dir" && as_dir=.
6560    for ac_exec_ext in '' $ac_executable_extensions; do
6561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564    break 2
6565  fi
6566done
6567  done
6568IFS=$as_save_IFS
6569
6570  ;;
6571esac
6572fi
6573DATE=$ac_cv_path_DATE
6574if test -n "$DATE"; then
6575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6576$as_echo "$DATE" >&6; }
6577else
6578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579$as_echo "no" >&6; }
6580fi
6581
6582
6583  test -n "$DATE" && break
6584done
6585
6586  else
6587    # The variable is set, but is it from the command line or the environment?
6588
6589    # Try to remove the string !DATE! from our list.
6590    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6591    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6592      # If it failed, the variable was not from the command line. Ignore it,
6593      # but warn the user (except for BASH, which is always set by the calling BASH).
6594      if test "xDATE" != xBASH; then
6595        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6596$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6597      fi
6598      # Try to locate tool using the code snippet
6599      for ac_prog in date
6600do
6601  # Extract the first word of "$ac_prog", so it can be a program name with args.
6602set dummy $ac_prog; ac_word=$2
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6604$as_echo_n "checking for $ac_word... " >&6; }
6605if ${ac_cv_path_DATE+:} false; then :
6606  $as_echo_n "(cached) " >&6
6607else
6608  case $DATE in
6609  [\\/]* | ?:[\\/]*)
6610  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6611  ;;
6612  *)
6613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6614for as_dir in $PATH
6615do
6616  IFS=$as_save_IFS
6617  test -z "$as_dir" && as_dir=.
6618    for ac_exec_ext in '' $ac_executable_extensions; do
6619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6620    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6622    break 2
6623  fi
6624done
6625  done
6626IFS=$as_save_IFS
6627
6628  ;;
6629esac
6630fi
6631DATE=$ac_cv_path_DATE
6632if test -n "$DATE"; then
6633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6634$as_echo "$DATE" >&6; }
6635else
6636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637$as_echo "no" >&6; }
6638fi
6639
6640
6641  test -n "$DATE" && break
6642done
6643
6644    else
6645      # If it succeeded, then it was overridden by the user. We will use it
6646      # for the tool.
6647
6648      # First remove it from the list of overridden variables, so we can test
6649      # for unknown variables in the end.
6650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6651
6652      # Check if we try to supply an empty value
6653      if test "x$DATE" = x; then
6654        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6655$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6656        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6657$as_echo_n "checking for DATE... " >&6; }
6658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6659$as_echo "disabled" >&6; }
6660      else
6661        # Check if the provided tool contains a complete path.
6662        tool_specified="$DATE"
6663        tool_basename="${tool_specified##*/}"
6664        if test "x$tool_basename" = "x$tool_specified"; then
6665          # A command without a complete path is provided, search $PATH.
6666          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6667$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6668          # Extract the first word of "$tool_basename", so it can be a program name with args.
6669set dummy $tool_basename; ac_word=$2
6670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671$as_echo_n "checking for $ac_word... " >&6; }
6672if ${ac_cv_path_DATE+:} false; then :
6673  $as_echo_n "(cached) " >&6
6674else
6675  case $DATE in
6676  [\\/]* | ?:[\\/]*)
6677  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6678  ;;
6679  *)
6680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6681for as_dir in $PATH
6682do
6683  IFS=$as_save_IFS
6684  test -z "$as_dir" && as_dir=.
6685    for ac_exec_ext in '' $ac_executable_extensions; do
6686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6687    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6689    break 2
6690  fi
6691done
6692  done
6693IFS=$as_save_IFS
6694
6695  ;;
6696esac
6697fi
6698DATE=$ac_cv_path_DATE
6699if test -n "$DATE"; then
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6701$as_echo "$DATE" >&6; }
6702else
6703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6704$as_echo "no" >&6; }
6705fi
6706
6707
6708          if test "x$DATE" = x; then
6709            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6710          fi
6711        else
6712          # Otherwise we believe it is a complete path. Use it as it is.
6713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6714$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6716$as_echo_n "checking for DATE... " >&6; }
6717          if test ! -x "$tool_specified"; then
6718            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6719$as_echo "not found" >&6; }
6720            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6721          fi
6722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6723$as_echo "$tool_specified" >&6; }
6724        fi
6725      fi
6726    fi
6727
6728  fi
6729
6730
6731
6732  if test "x$DATE" = x; then
6733    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6734  fi
6735
6736
6737
6738
6739
6740  # Publish this variable in the help.
6741
6742
6743  if [ -z "${DIFF+x}" ]; then
6744    # The variable is not set by user, try to locate tool using the code snippet
6745    for ac_prog in gdiff diff
6746do
6747  # Extract the first word of "$ac_prog", so it can be a program name with args.
6748set dummy $ac_prog; ac_word=$2
6749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6750$as_echo_n "checking for $ac_word... " >&6; }
6751if ${ac_cv_path_DIFF+:} false; then :
6752  $as_echo_n "(cached) " >&6
6753else
6754  case $DIFF in
6755  [\\/]* | ?:[\\/]*)
6756  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6757  ;;
6758  *)
6759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6760for as_dir in $PATH
6761do
6762  IFS=$as_save_IFS
6763  test -z "$as_dir" && as_dir=.
6764    for ac_exec_ext in '' $ac_executable_extensions; do
6765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6766    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6768    break 2
6769  fi
6770done
6771  done
6772IFS=$as_save_IFS
6773
6774  ;;
6775esac
6776fi
6777DIFF=$ac_cv_path_DIFF
6778if test -n "$DIFF"; then
6779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6780$as_echo "$DIFF" >&6; }
6781else
6782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6783$as_echo "no" >&6; }
6784fi
6785
6786
6787  test -n "$DIFF" && break
6788done
6789
6790  else
6791    # The variable is set, but is it from the command line or the environment?
6792
6793    # Try to remove the string !DIFF! from our list.
6794    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6795    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6796      # If it failed, the variable was not from the command line. Ignore it,
6797      # but warn the user (except for BASH, which is always set by the calling BASH).
6798      if test "xDIFF" != xBASH; then
6799        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6800$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6801      fi
6802      # Try to locate tool using the code snippet
6803      for ac_prog in gdiff diff
6804do
6805  # Extract the first word of "$ac_prog", so it can be a program name with args.
6806set dummy $ac_prog; ac_word=$2
6807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6808$as_echo_n "checking for $ac_word... " >&6; }
6809if ${ac_cv_path_DIFF+:} false; then :
6810  $as_echo_n "(cached) " >&6
6811else
6812  case $DIFF in
6813  [\\/]* | ?:[\\/]*)
6814  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6815  ;;
6816  *)
6817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6818for as_dir in $PATH
6819do
6820  IFS=$as_save_IFS
6821  test -z "$as_dir" && as_dir=.
6822    for ac_exec_ext in '' $ac_executable_extensions; do
6823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6824    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6826    break 2
6827  fi
6828done
6829  done
6830IFS=$as_save_IFS
6831
6832  ;;
6833esac
6834fi
6835DIFF=$ac_cv_path_DIFF
6836if test -n "$DIFF"; then
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6838$as_echo "$DIFF" >&6; }
6839else
6840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6841$as_echo "no" >&6; }
6842fi
6843
6844
6845  test -n "$DIFF" && break
6846done
6847
6848    else
6849      # If it succeeded, then it was overridden by the user. We will use it
6850      # for the tool.
6851
6852      # First remove it from the list of overridden variables, so we can test
6853      # for unknown variables in the end.
6854      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6855
6856      # Check if we try to supply an empty value
6857      if test "x$DIFF" = x; then
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6859$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6861$as_echo_n "checking for DIFF... " >&6; }
6862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6863$as_echo "disabled" >&6; }
6864      else
6865        # Check if the provided tool contains a complete path.
6866        tool_specified="$DIFF"
6867        tool_basename="${tool_specified##*/}"
6868        if test "x$tool_basename" = "x$tool_specified"; then
6869          # A command without a complete path is provided, search $PATH.
6870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6871$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6872          # Extract the first word of "$tool_basename", so it can be a program name with args.
6873set dummy $tool_basename; ac_word=$2
6874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6875$as_echo_n "checking for $ac_word... " >&6; }
6876if ${ac_cv_path_DIFF+:} false; then :
6877  $as_echo_n "(cached) " >&6
6878else
6879  case $DIFF in
6880  [\\/]* | ?:[\\/]*)
6881  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6882  ;;
6883  *)
6884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6885for as_dir in $PATH
6886do
6887  IFS=$as_save_IFS
6888  test -z "$as_dir" && as_dir=.
6889    for ac_exec_ext in '' $ac_executable_extensions; do
6890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6891    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6893    break 2
6894  fi
6895done
6896  done
6897IFS=$as_save_IFS
6898
6899  ;;
6900esac
6901fi
6902DIFF=$ac_cv_path_DIFF
6903if test -n "$DIFF"; then
6904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6905$as_echo "$DIFF" >&6; }
6906else
6907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6908$as_echo "no" >&6; }
6909fi
6910
6911
6912          if test "x$DIFF" = x; then
6913            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6914          fi
6915        else
6916          # Otherwise we believe it is a complete path. Use it as it is.
6917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6918$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6919          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6920$as_echo_n "checking for DIFF... " >&6; }
6921          if test ! -x "$tool_specified"; then
6922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6923$as_echo "not found" >&6; }
6924            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6925          fi
6926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6927$as_echo "$tool_specified" >&6; }
6928        fi
6929      fi
6930    fi
6931
6932  fi
6933
6934
6935
6936  if test "x$DIFF" = x; then
6937    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6938  fi
6939
6940
6941
6942
6943
6944  # Publish this variable in the help.
6945
6946
6947  if [ -z "${DIRNAME+x}" ]; then
6948    # The variable is not set by user, try to locate tool using the code snippet
6949    for ac_prog in dirname
6950do
6951  # Extract the first word of "$ac_prog", so it can be a program name with args.
6952set dummy $ac_prog; ac_word=$2
6953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6954$as_echo_n "checking for $ac_word... " >&6; }
6955if ${ac_cv_path_DIRNAME+:} false; then :
6956  $as_echo_n "(cached) " >&6
6957else
6958  case $DIRNAME in
6959  [\\/]* | ?:[\\/]*)
6960  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6961  ;;
6962  *)
6963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6964for as_dir in $PATH
6965do
6966  IFS=$as_save_IFS
6967  test -z "$as_dir" && as_dir=.
6968    for ac_exec_ext in '' $ac_executable_extensions; do
6969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6970    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6972    break 2
6973  fi
6974done
6975  done
6976IFS=$as_save_IFS
6977
6978  ;;
6979esac
6980fi
6981DIRNAME=$ac_cv_path_DIRNAME
6982if test -n "$DIRNAME"; then
6983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6984$as_echo "$DIRNAME" >&6; }
6985else
6986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6987$as_echo "no" >&6; }
6988fi
6989
6990
6991  test -n "$DIRNAME" && break
6992done
6993
6994  else
6995    # The variable is set, but is it from the command line or the environment?
6996
6997    # Try to remove the string !DIRNAME! from our list.
6998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7000      # If it failed, the variable was not from the command line. Ignore it,
7001      # but warn the user (except for BASH, which is always set by the calling BASH).
7002      if test "xDIRNAME" != xBASH; then
7003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7004$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7005      fi
7006      # Try to locate tool using the code snippet
7007      for ac_prog in dirname
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_DIRNAME+:} false; then :
7014  $as_echo_n "(cached) " >&6
7015else
7016  case $DIRNAME in
7017  [\\/]* | ?:[\\/]*)
7018  ac_cv_path_DIRNAME="$DIRNAME" # 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_DIRNAME="$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
7039DIRNAME=$ac_cv_path_DIRNAME
7040if test -n "$DIRNAME"; then
7041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7042$as_echo "$DIRNAME" >&6; }
7043else
7044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7045$as_echo "no" >&6; }
7046fi
7047
7048
7049  test -n "$DIRNAME" && break
7050done
7051
7052    else
7053      # If it succeeded, then it was overridden by the user. We will use it
7054      # for the tool.
7055
7056      # First remove it from the list of overridden variables, so we can test
7057      # for unknown variables in the end.
7058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7059
7060      # Check if we try to supply an empty value
7061      if test "x$DIRNAME" = x; then
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7063$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7065$as_echo_n "checking for DIRNAME... " >&6; }
7066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7067$as_echo "disabled" >&6; }
7068      else
7069        # Check if the provided tool contains a complete path.
7070        tool_specified="$DIRNAME"
7071        tool_basename="${tool_specified##*/}"
7072        if test "x$tool_basename" = "x$tool_specified"; then
7073          # A command without a complete path is provided, search $PATH.
7074          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7075$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7076          # Extract the first word of "$tool_basename", so it can be a program name with args.
7077set dummy $tool_basename; ac_word=$2
7078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7079$as_echo_n "checking for $ac_word... " >&6; }
7080if ${ac_cv_path_DIRNAME+:} false; then :
7081  $as_echo_n "(cached) " >&6
7082else
7083  case $DIRNAME in
7084  [\\/]* | ?:[\\/]*)
7085  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7086  ;;
7087  *)
7088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089for as_dir in $PATH
7090do
7091  IFS=$as_save_IFS
7092  test -z "$as_dir" && as_dir=.
7093    for ac_exec_ext in '' $ac_executable_extensions; do
7094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7095    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7097    break 2
7098  fi
7099done
7100  done
7101IFS=$as_save_IFS
7102
7103  ;;
7104esac
7105fi
7106DIRNAME=$ac_cv_path_DIRNAME
7107if test -n "$DIRNAME"; then
7108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7109$as_echo "$DIRNAME" >&6; }
7110else
7111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7112$as_echo "no" >&6; }
7113fi
7114
7115
7116          if test "x$DIRNAME" = x; then
7117            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7118          fi
7119        else
7120          # Otherwise we believe it is a complete path. Use it as it is.
7121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7122$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7123          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7124$as_echo_n "checking for DIRNAME... " >&6; }
7125          if test ! -x "$tool_specified"; then
7126            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7127$as_echo "not found" >&6; }
7128            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7129          fi
7130          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7131$as_echo "$tool_specified" >&6; }
7132        fi
7133      fi
7134    fi
7135
7136  fi
7137
7138
7139
7140  if test "x$DIRNAME" = x; then
7141    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7142  fi
7143
7144
7145
7146
7147
7148  # Publish this variable in the help.
7149
7150
7151  if [ -z "${ECHO+x}" ]; then
7152    # The variable is not set by user, try to locate tool using the code snippet
7153    for ac_prog in echo
7154do
7155  # Extract the first word of "$ac_prog", so it can be a program name with args.
7156set dummy $ac_prog; ac_word=$2
7157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7158$as_echo_n "checking for $ac_word... " >&6; }
7159if ${ac_cv_path_ECHO+:} false; then :
7160  $as_echo_n "(cached) " >&6
7161else
7162  case $ECHO in
7163  [\\/]* | ?:[\\/]*)
7164  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7165  ;;
7166  *)
7167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7168for as_dir in $PATH
7169do
7170  IFS=$as_save_IFS
7171  test -z "$as_dir" && as_dir=.
7172    for ac_exec_ext in '' $ac_executable_extensions; do
7173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7174    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7176    break 2
7177  fi
7178done
7179  done
7180IFS=$as_save_IFS
7181
7182  ;;
7183esac
7184fi
7185ECHO=$ac_cv_path_ECHO
7186if test -n "$ECHO"; then
7187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7188$as_echo "$ECHO" >&6; }
7189else
7190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7191$as_echo "no" >&6; }
7192fi
7193
7194
7195  test -n "$ECHO" && break
7196done
7197
7198  else
7199    # The variable is set, but is it from the command line or the environment?
7200
7201    # Try to remove the string !ECHO! from our list.
7202    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7203    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7204      # If it failed, the variable was not from the command line. Ignore it,
7205      # but warn the user (except for BASH, which is always set by the calling BASH).
7206      if test "xECHO" != xBASH; then
7207        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7208$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7209      fi
7210      # Try to locate tool using the code snippet
7211      for ac_prog in echo
7212do
7213  # Extract the first word of "$ac_prog", so it can be a program name with args.
7214set dummy $ac_prog; ac_word=$2
7215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7216$as_echo_n "checking for $ac_word... " >&6; }
7217if ${ac_cv_path_ECHO+:} false; then :
7218  $as_echo_n "(cached) " >&6
7219else
7220  case $ECHO in
7221  [\\/]* | ?:[\\/]*)
7222  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7223  ;;
7224  *)
7225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7226for as_dir in $PATH
7227do
7228  IFS=$as_save_IFS
7229  test -z "$as_dir" && as_dir=.
7230    for ac_exec_ext in '' $ac_executable_extensions; do
7231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7232    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7234    break 2
7235  fi
7236done
7237  done
7238IFS=$as_save_IFS
7239
7240  ;;
7241esac
7242fi
7243ECHO=$ac_cv_path_ECHO
7244if test -n "$ECHO"; then
7245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7246$as_echo "$ECHO" >&6; }
7247else
7248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7249$as_echo "no" >&6; }
7250fi
7251
7252
7253  test -n "$ECHO" && break
7254done
7255
7256    else
7257      # If it succeeded, then it was overridden by the user. We will use it
7258      # for the tool.
7259
7260      # First remove it from the list of overridden variables, so we can test
7261      # for unknown variables in the end.
7262      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7263
7264      # Check if we try to supply an empty value
7265      if test "x$ECHO" = x; then
7266        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7267$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7268        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7269$as_echo_n "checking for ECHO... " >&6; }
7270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7271$as_echo "disabled" >&6; }
7272      else
7273        # Check if the provided tool contains a complete path.
7274        tool_specified="$ECHO"
7275        tool_basename="${tool_specified##*/}"
7276        if test "x$tool_basename" = "x$tool_specified"; then
7277          # A command without a complete path is provided, search $PATH.
7278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7279$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7280          # Extract the first word of "$tool_basename", so it can be a program name with args.
7281set dummy $tool_basename; ac_word=$2
7282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7283$as_echo_n "checking for $ac_word... " >&6; }
7284if ${ac_cv_path_ECHO+:} false; then :
7285  $as_echo_n "(cached) " >&6
7286else
7287  case $ECHO in
7288  [\\/]* | ?:[\\/]*)
7289  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7290  ;;
7291  *)
7292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7293for as_dir in $PATH
7294do
7295  IFS=$as_save_IFS
7296  test -z "$as_dir" && as_dir=.
7297    for ac_exec_ext in '' $ac_executable_extensions; do
7298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7299    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7301    break 2
7302  fi
7303done
7304  done
7305IFS=$as_save_IFS
7306
7307  ;;
7308esac
7309fi
7310ECHO=$ac_cv_path_ECHO
7311if test -n "$ECHO"; then
7312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7313$as_echo "$ECHO" >&6; }
7314else
7315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7316$as_echo "no" >&6; }
7317fi
7318
7319
7320          if test "x$ECHO" = x; then
7321            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7322          fi
7323        else
7324          # Otherwise we believe it is a complete path. Use it as it is.
7325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7326$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7328$as_echo_n "checking for ECHO... " >&6; }
7329          if test ! -x "$tool_specified"; then
7330            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7331$as_echo "not found" >&6; }
7332            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7333          fi
7334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7335$as_echo "$tool_specified" >&6; }
7336        fi
7337      fi
7338    fi
7339
7340  fi
7341
7342
7343
7344  if test "x$ECHO" = x; then
7345    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7346  fi
7347
7348
7349
7350
7351
7352  # Publish this variable in the help.
7353
7354
7355  if [ -z "${EXPR+x}" ]; then
7356    # The variable is not set by user, try to locate tool using the code snippet
7357    for ac_prog in expr
7358do
7359  # Extract the first word of "$ac_prog", so it can be a program name with args.
7360set dummy $ac_prog; ac_word=$2
7361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7362$as_echo_n "checking for $ac_word... " >&6; }
7363if ${ac_cv_path_EXPR+:} false; then :
7364  $as_echo_n "(cached) " >&6
7365else
7366  case $EXPR in
7367  [\\/]* | ?:[\\/]*)
7368  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7369  ;;
7370  *)
7371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7372for as_dir in $PATH
7373do
7374  IFS=$as_save_IFS
7375  test -z "$as_dir" && as_dir=.
7376    for ac_exec_ext in '' $ac_executable_extensions; do
7377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7378    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7380    break 2
7381  fi
7382done
7383  done
7384IFS=$as_save_IFS
7385
7386  ;;
7387esac
7388fi
7389EXPR=$ac_cv_path_EXPR
7390if test -n "$EXPR"; then
7391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7392$as_echo "$EXPR" >&6; }
7393else
7394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7395$as_echo "no" >&6; }
7396fi
7397
7398
7399  test -n "$EXPR" && break
7400done
7401
7402  else
7403    # The variable is set, but is it from the command line or the environment?
7404
7405    # Try to remove the string !EXPR! from our list.
7406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7408      # If it failed, the variable was not from the command line. Ignore it,
7409      # but warn the user (except for BASH, which is always set by the calling BASH).
7410      if test "xEXPR" != xBASH; then
7411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7412$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7413      fi
7414      # Try to locate tool using the code snippet
7415      for ac_prog in expr
7416do
7417  # Extract the first word of "$ac_prog", so it can be a program name with args.
7418set dummy $ac_prog; ac_word=$2
7419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7420$as_echo_n "checking for $ac_word... " >&6; }
7421if ${ac_cv_path_EXPR+:} false; then :
7422  $as_echo_n "(cached) " >&6
7423else
7424  case $EXPR in
7425  [\\/]* | ?:[\\/]*)
7426  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7427  ;;
7428  *)
7429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7430for as_dir in $PATH
7431do
7432  IFS=$as_save_IFS
7433  test -z "$as_dir" && as_dir=.
7434    for ac_exec_ext in '' $ac_executable_extensions; do
7435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7436    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7438    break 2
7439  fi
7440done
7441  done
7442IFS=$as_save_IFS
7443
7444  ;;
7445esac
7446fi
7447EXPR=$ac_cv_path_EXPR
7448if test -n "$EXPR"; then
7449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7450$as_echo "$EXPR" >&6; }
7451else
7452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7453$as_echo "no" >&6; }
7454fi
7455
7456
7457  test -n "$EXPR" && break
7458done
7459
7460    else
7461      # If it succeeded, then it was overridden by the user. We will use it
7462      # for the tool.
7463
7464      # First remove it from the list of overridden variables, so we can test
7465      # for unknown variables in the end.
7466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7467
7468      # Check if we try to supply an empty value
7469      if test "x$EXPR" = x; then
7470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7471$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7473$as_echo_n "checking for EXPR... " >&6; }
7474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7475$as_echo "disabled" >&6; }
7476      else
7477        # Check if the provided tool contains a complete path.
7478        tool_specified="$EXPR"
7479        tool_basename="${tool_specified##*/}"
7480        if test "x$tool_basename" = "x$tool_specified"; then
7481          # A command without a complete path is provided, search $PATH.
7482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7483$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7484          # Extract the first word of "$tool_basename", so it can be a program name with args.
7485set dummy $tool_basename; ac_word=$2
7486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7487$as_echo_n "checking for $ac_word... " >&6; }
7488if ${ac_cv_path_EXPR+:} false; then :
7489  $as_echo_n "(cached) " >&6
7490else
7491  case $EXPR in
7492  [\\/]* | ?:[\\/]*)
7493  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7494  ;;
7495  *)
7496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7497for as_dir in $PATH
7498do
7499  IFS=$as_save_IFS
7500  test -z "$as_dir" && as_dir=.
7501    for ac_exec_ext in '' $ac_executable_extensions; do
7502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7503    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7505    break 2
7506  fi
7507done
7508  done
7509IFS=$as_save_IFS
7510
7511  ;;
7512esac
7513fi
7514EXPR=$ac_cv_path_EXPR
7515if test -n "$EXPR"; then
7516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7517$as_echo "$EXPR" >&6; }
7518else
7519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7520$as_echo "no" >&6; }
7521fi
7522
7523
7524          if test "x$EXPR" = x; then
7525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7526          fi
7527        else
7528          # Otherwise we believe it is a complete path. Use it as it is.
7529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7530$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7532$as_echo_n "checking for EXPR... " >&6; }
7533          if test ! -x "$tool_specified"; then
7534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7535$as_echo "not found" >&6; }
7536            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7537          fi
7538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7539$as_echo "$tool_specified" >&6; }
7540        fi
7541      fi
7542    fi
7543
7544  fi
7545
7546
7547
7548  if test "x$EXPR" = x; then
7549    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7550  fi
7551
7552
7553
7554
7555
7556  # Publish this variable in the help.
7557
7558
7559  if [ -z "${FILE+x}" ]; then
7560    # The variable is not set by user, try to locate tool using the code snippet
7561    for ac_prog in file
7562do
7563  # Extract the first word of "$ac_prog", so it can be a program name with args.
7564set dummy $ac_prog; ac_word=$2
7565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7566$as_echo_n "checking for $ac_word... " >&6; }
7567if ${ac_cv_path_FILE+:} false; then :
7568  $as_echo_n "(cached) " >&6
7569else
7570  case $FILE in
7571  [\\/]* | ?:[\\/]*)
7572  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7573  ;;
7574  *)
7575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7576for as_dir in $PATH
7577do
7578  IFS=$as_save_IFS
7579  test -z "$as_dir" && as_dir=.
7580    for ac_exec_ext in '' $ac_executable_extensions; do
7581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7582    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7584    break 2
7585  fi
7586done
7587  done
7588IFS=$as_save_IFS
7589
7590  ;;
7591esac
7592fi
7593FILE=$ac_cv_path_FILE
7594if test -n "$FILE"; then
7595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7596$as_echo "$FILE" >&6; }
7597else
7598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7599$as_echo "no" >&6; }
7600fi
7601
7602
7603  test -n "$FILE" && break
7604done
7605
7606  else
7607    # The variable is set, but is it from the command line or the environment?
7608
7609    # Try to remove the string !FILE! from our list.
7610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7612      # If it failed, the variable was not from the command line. Ignore it,
7613      # but warn the user (except for BASH, which is always set by the calling BASH).
7614      if test "xFILE" != xBASH; then
7615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7616$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7617      fi
7618      # Try to locate tool using the code snippet
7619      for ac_prog in file
7620do
7621  # Extract the first word of "$ac_prog", so it can be a program name with args.
7622set dummy $ac_prog; ac_word=$2
7623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7624$as_echo_n "checking for $ac_word... " >&6; }
7625if ${ac_cv_path_FILE+:} false; then :
7626  $as_echo_n "(cached) " >&6
7627else
7628  case $FILE in
7629  [\\/]* | ?:[\\/]*)
7630  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7631  ;;
7632  *)
7633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7634for as_dir in $PATH
7635do
7636  IFS=$as_save_IFS
7637  test -z "$as_dir" && as_dir=.
7638    for ac_exec_ext in '' $ac_executable_extensions; do
7639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7640    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7642    break 2
7643  fi
7644done
7645  done
7646IFS=$as_save_IFS
7647
7648  ;;
7649esac
7650fi
7651FILE=$ac_cv_path_FILE
7652if test -n "$FILE"; then
7653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7654$as_echo "$FILE" >&6; }
7655else
7656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7657$as_echo "no" >&6; }
7658fi
7659
7660
7661  test -n "$FILE" && break
7662done
7663
7664    else
7665      # If it succeeded, then it was overridden by the user. We will use it
7666      # for the tool.
7667
7668      # First remove it from the list of overridden variables, so we can test
7669      # for unknown variables in the end.
7670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7671
7672      # Check if we try to supply an empty value
7673      if test "x$FILE" = x; then
7674        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7675$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7677$as_echo_n "checking for FILE... " >&6; }
7678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7679$as_echo "disabled" >&6; }
7680      else
7681        # Check if the provided tool contains a complete path.
7682        tool_specified="$FILE"
7683        tool_basename="${tool_specified##*/}"
7684        if test "x$tool_basename" = "x$tool_specified"; then
7685          # A command without a complete path is provided, search $PATH.
7686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7687$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7688          # Extract the first word of "$tool_basename", so it can be a program name with args.
7689set dummy $tool_basename; ac_word=$2
7690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7691$as_echo_n "checking for $ac_word... " >&6; }
7692if ${ac_cv_path_FILE+:} false; then :
7693  $as_echo_n "(cached) " >&6
7694else
7695  case $FILE in
7696  [\\/]* | ?:[\\/]*)
7697  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7698  ;;
7699  *)
7700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7701for as_dir in $PATH
7702do
7703  IFS=$as_save_IFS
7704  test -z "$as_dir" && as_dir=.
7705    for ac_exec_ext in '' $ac_executable_extensions; do
7706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7707    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7709    break 2
7710  fi
7711done
7712  done
7713IFS=$as_save_IFS
7714
7715  ;;
7716esac
7717fi
7718FILE=$ac_cv_path_FILE
7719if test -n "$FILE"; then
7720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7721$as_echo "$FILE" >&6; }
7722else
7723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7724$as_echo "no" >&6; }
7725fi
7726
7727
7728          if test "x$FILE" = x; then
7729            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7730          fi
7731        else
7732          # Otherwise we believe it is a complete path. Use it as it is.
7733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7734$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7735          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7736$as_echo_n "checking for FILE... " >&6; }
7737          if test ! -x "$tool_specified"; then
7738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7739$as_echo "not found" >&6; }
7740            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7741          fi
7742          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7743$as_echo "$tool_specified" >&6; }
7744        fi
7745      fi
7746    fi
7747
7748  fi
7749
7750
7751
7752  if test "x$FILE" = x; then
7753    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7754  fi
7755
7756
7757
7758
7759
7760  # Publish this variable in the help.
7761
7762
7763  if [ -z "${FIND+x}" ]; then
7764    # The variable is not set by user, try to locate tool using the code snippet
7765    for ac_prog in find
7766do
7767  # Extract the first word of "$ac_prog", so it can be a program name with args.
7768set dummy $ac_prog; ac_word=$2
7769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7770$as_echo_n "checking for $ac_word... " >&6; }
7771if ${ac_cv_path_FIND+:} false; then :
7772  $as_echo_n "(cached) " >&6
7773else
7774  case $FIND in
7775  [\\/]* | ?:[\\/]*)
7776  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7777  ;;
7778  *)
7779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780for as_dir in $PATH
7781do
7782  IFS=$as_save_IFS
7783  test -z "$as_dir" && as_dir=.
7784    for ac_exec_ext in '' $ac_executable_extensions; do
7785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7786    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7788    break 2
7789  fi
7790done
7791  done
7792IFS=$as_save_IFS
7793
7794  ;;
7795esac
7796fi
7797FIND=$ac_cv_path_FIND
7798if test -n "$FIND"; then
7799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7800$as_echo "$FIND" >&6; }
7801else
7802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7803$as_echo "no" >&6; }
7804fi
7805
7806
7807  test -n "$FIND" && break
7808done
7809
7810  else
7811    # The variable is set, but is it from the command line or the environment?
7812
7813    # Try to remove the string !FIND! from our list.
7814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7816      # If it failed, the variable was not from the command line. Ignore it,
7817      # but warn the user (except for BASH, which is always set by the calling BASH).
7818      if test "xFIND" != xBASH; then
7819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7820$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7821      fi
7822      # Try to locate tool using the code snippet
7823      for ac_prog in find
7824do
7825  # Extract the first word of "$ac_prog", so it can be a program name with args.
7826set dummy $ac_prog; ac_word=$2
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7828$as_echo_n "checking for $ac_word... " >&6; }
7829if ${ac_cv_path_FIND+:} false; then :
7830  $as_echo_n "(cached) " >&6
7831else
7832  case $FIND in
7833  [\\/]* | ?:[\\/]*)
7834  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7835  ;;
7836  *)
7837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840  IFS=$as_save_IFS
7841  test -z "$as_dir" && as_dir=.
7842    for ac_exec_ext in '' $ac_executable_extensions; do
7843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7844    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7846    break 2
7847  fi
7848done
7849  done
7850IFS=$as_save_IFS
7851
7852  ;;
7853esac
7854fi
7855FIND=$ac_cv_path_FIND
7856if test -n "$FIND"; then
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7858$as_echo "$FIND" >&6; }
7859else
7860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7861$as_echo "no" >&6; }
7862fi
7863
7864
7865  test -n "$FIND" && break
7866done
7867
7868    else
7869      # If it succeeded, then it was overridden by the user. We will use it
7870      # for the tool.
7871
7872      # First remove it from the list of overridden variables, so we can test
7873      # for unknown variables in the end.
7874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7875
7876      # Check if we try to supply an empty value
7877      if test "x$FIND" = x; then
7878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7879$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7881$as_echo_n "checking for FIND... " >&6; }
7882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7883$as_echo "disabled" >&6; }
7884      else
7885        # Check if the provided tool contains a complete path.
7886        tool_specified="$FIND"
7887        tool_basename="${tool_specified##*/}"
7888        if test "x$tool_basename" = "x$tool_specified"; then
7889          # A command without a complete path is provided, search $PATH.
7890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7891$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7892          # Extract the first word of "$tool_basename", so it can be a program name with args.
7893set dummy $tool_basename; ac_word=$2
7894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7895$as_echo_n "checking for $ac_word... " >&6; }
7896if ${ac_cv_path_FIND+:} false; then :
7897  $as_echo_n "(cached) " >&6
7898else
7899  case $FIND in
7900  [\\/]* | ?:[\\/]*)
7901  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7902  ;;
7903  *)
7904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7905for as_dir in $PATH
7906do
7907  IFS=$as_save_IFS
7908  test -z "$as_dir" && as_dir=.
7909    for ac_exec_ext in '' $ac_executable_extensions; do
7910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7911    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7913    break 2
7914  fi
7915done
7916  done
7917IFS=$as_save_IFS
7918
7919  ;;
7920esac
7921fi
7922FIND=$ac_cv_path_FIND
7923if test -n "$FIND"; then
7924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7925$as_echo "$FIND" >&6; }
7926else
7927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7928$as_echo "no" >&6; }
7929fi
7930
7931
7932          if test "x$FIND" = x; then
7933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7934          fi
7935        else
7936          # Otherwise we believe it is a complete path. Use it as it is.
7937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7938$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7940$as_echo_n "checking for FIND... " >&6; }
7941          if test ! -x "$tool_specified"; then
7942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7943$as_echo "not found" >&6; }
7944            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7945          fi
7946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7947$as_echo "$tool_specified" >&6; }
7948        fi
7949      fi
7950    fi
7951
7952  fi
7953
7954
7955
7956  if test "x$FIND" = x; then
7957    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7958  fi
7959
7960
7961
7962
7963
7964  # Publish this variable in the help.
7965
7966
7967  if [ -z "${HEAD+x}" ]; then
7968    # The variable is not set by user, try to locate tool using the code snippet
7969    for ac_prog in head
7970do
7971  # Extract the first word of "$ac_prog", so it can be a program name with args.
7972set dummy $ac_prog; ac_word=$2
7973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7974$as_echo_n "checking for $ac_word... " >&6; }
7975if ${ac_cv_path_HEAD+:} false; then :
7976  $as_echo_n "(cached) " >&6
7977else
7978  case $HEAD in
7979  [\\/]* | ?:[\\/]*)
7980  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7981  ;;
7982  *)
7983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7984for as_dir in $PATH
7985do
7986  IFS=$as_save_IFS
7987  test -z "$as_dir" && as_dir=.
7988    for ac_exec_ext in '' $ac_executable_extensions; do
7989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7990    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7992    break 2
7993  fi
7994done
7995  done
7996IFS=$as_save_IFS
7997
7998  ;;
7999esac
8000fi
8001HEAD=$ac_cv_path_HEAD
8002if test -n "$HEAD"; then
8003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8004$as_echo "$HEAD" >&6; }
8005else
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8007$as_echo "no" >&6; }
8008fi
8009
8010
8011  test -n "$HEAD" && break
8012done
8013
8014  else
8015    # The variable is set, but is it from the command line or the environment?
8016
8017    # Try to remove the string !HEAD! from our list.
8018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8020      # If it failed, the variable was not from the command line. Ignore it,
8021      # but warn the user (except for BASH, which is always set by the calling BASH).
8022      if test "xHEAD" != xBASH; then
8023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8024$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8025      fi
8026      # Try to locate tool using the code snippet
8027      for ac_prog in head
8028do
8029  # Extract the first word of "$ac_prog", so it can be a program name with args.
8030set dummy $ac_prog; ac_word=$2
8031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8032$as_echo_n "checking for $ac_word... " >&6; }
8033if ${ac_cv_path_HEAD+:} false; then :
8034  $as_echo_n "(cached) " >&6
8035else
8036  case $HEAD in
8037  [\\/]* | ?:[\\/]*)
8038  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8039  ;;
8040  *)
8041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8042for as_dir in $PATH
8043do
8044  IFS=$as_save_IFS
8045  test -z "$as_dir" && as_dir=.
8046    for ac_exec_ext in '' $ac_executable_extensions; do
8047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8048    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8050    break 2
8051  fi
8052done
8053  done
8054IFS=$as_save_IFS
8055
8056  ;;
8057esac
8058fi
8059HEAD=$ac_cv_path_HEAD
8060if test -n "$HEAD"; then
8061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8062$as_echo "$HEAD" >&6; }
8063else
8064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8065$as_echo "no" >&6; }
8066fi
8067
8068
8069  test -n "$HEAD" && break
8070done
8071
8072    else
8073      # If it succeeded, then it was overridden by the user. We will use it
8074      # for the tool.
8075
8076      # First remove it from the list of overridden variables, so we can test
8077      # for unknown variables in the end.
8078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8079
8080      # Check if we try to supply an empty value
8081      if test "x$HEAD" = x; then
8082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8083$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8085$as_echo_n "checking for HEAD... " >&6; }
8086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8087$as_echo "disabled" >&6; }
8088      else
8089        # Check if the provided tool contains a complete path.
8090        tool_specified="$HEAD"
8091        tool_basename="${tool_specified##*/}"
8092        if test "x$tool_basename" = "x$tool_specified"; then
8093          # A command without a complete path is provided, search $PATH.
8094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8095$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8096          # Extract the first word of "$tool_basename", so it can be a program name with args.
8097set dummy $tool_basename; ac_word=$2
8098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8099$as_echo_n "checking for $ac_word... " >&6; }
8100if ${ac_cv_path_HEAD+:} false; then :
8101  $as_echo_n "(cached) " >&6
8102else
8103  case $HEAD in
8104  [\\/]* | ?:[\\/]*)
8105  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8106  ;;
8107  *)
8108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8109for as_dir in $PATH
8110do
8111  IFS=$as_save_IFS
8112  test -z "$as_dir" && as_dir=.
8113    for ac_exec_ext in '' $ac_executable_extensions; do
8114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8115    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8117    break 2
8118  fi
8119done
8120  done
8121IFS=$as_save_IFS
8122
8123  ;;
8124esac
8125fi
8126HEAD=$ac_cv_path_HEAD
8127if test -n "$HEAD"; then
8128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8129$as_echo "$HEAD" >&6; }
8130else
8131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8132$as_echo "no" >&6; }
8133fi
8134
8135
8136          if test "x$HEAD" = x; then
8137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8138          fi
8139        else
8140          # Otherwise we believe it is a complete path. Use it as it is.
8141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8142$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8144$as_echo_n "checking for HEAD... " >&6; }
8145          if test ! -x "$tool_specified"; then
8146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8147$as_echo "not found" >&6; }
8148            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8149          fi
8150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8151$as_echo "$tool_specified" >&6; }
8152        fi
8153      fi
8154    fi
8155
8156  fi
8157
8158
8159
8160  if test "x$HEAD" = x; then
8161    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8162  fi
8163
8164
8165
8166
8167
8168  # Publish this variable in the help.
8169
8170
8171  if [ -z "${LN+x}" ]; then
8172    # The variable is not set by user, try to locate tool using the code snippet
8173    for ac_prog in ln
8174do
8175  # Extract the first word of "$ac_prog", so it can be a program name with args.
8176set dummy $ac_prog; ac_word=$2
8177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8178$as_echo_n "checking for $ac_word... " >&6; }
8179if ${ac_cv_path_LN+:} false; then :
8180  $as_echo_n "(cached) " >&6
8181else
8182  case $LN in
8183  [\\/]* | ?:[\\/]*)
8184  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8185  ;;
8186  *)
8187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8188for as_dir in $PATH
8189do
8190  IFS=$as_save_IFS
8191  test -z "$as_dir" && as_dir=.
8192    for ac_exec_ext in '' $ac_executable_extensions; do
8193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8194    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8196    break 2
8197  fi
8198done
8199  done
8200IFS=$as_save_IFS
8201
8202  ;;
8203esac
8204fi
8205LN=$ac_cv_path_LN
8206if test -n "$LN"; then
8207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8208$as_echo "$LN" >&6; }
8209else
8210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8211$as_echo "no" >&6; }
8212fi
8213
8214
8215  test -n "$LN" && break
8216done
8217
8218  else
8219    # The variable is set, but is it from the command line or the environment?
8220
8221    # Try to remove the string !LN! from our list.
8222    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8223    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8224      # If it failed, the variable was not from the command line. Ignore it,
8225      # but warn the user (except for BASH, which is always set by the calling BASH).
8226      if test "xLN" != xBASH; then
8227        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8228$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8229      fi
8230      # Try to locate tool using the code snippet
8231      for ac_prog in ln
8232do
8233  # Extract the first word of "$ac_prog", so it can be a program name with args.
8234set dummy $ac_prog; ac_word=$2
8235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8236$as_echo_n "checking for $ac_word... " >&6; }
8237if ${ac_cv_path_LN+:} false; then :
8238  $as_echo_n "(cached) " >&6
8239else
8240  case $LN in
8241  [\\/]* | ?:[\\/]*)
8242  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8243  ;;
8244  *)
8245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8246for as_dir in $PATH
8247do
8248  IFS=$as_save_IFS
8249  test -z "$as_dir" && as_dir=.
8250    for ac_exec_ext in '' $ac_executable_extensions; do
8251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8252    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8254    break 2
8255  fi
8256done
8257  done
8258IFS=$as_save_IFS
8259
8260  ;;
8261esac
8262fi
8263LN=$ac_cv_path_LN
8264if test -n "$LN"; then
8265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8266$as_echo "$LN" >&6; }
8267else
8268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8269$as_echo "no" >&6; }
8270fi
8271
8272
8273  test -n "$LN" && break
8274done
8275
8276    else
8277      # If it succeeded, then it was overridden by the user. We will use it
8278      # for the tool.
8279
8280      # First remove it from the list of overridden variables, so we can test
8281      # for unknown variables in the end.
8282      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8283
8284      # Check if we try to supply an empty value
8285      if test "x$LN" = x; then
8286        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8287$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8288        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8289$as_echo_n "checking for LN... " >&6; }
8290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8291$as_echo "disabled" >&6; }
8292      else
8293        # Check if the provided tool contains a complete path.
8294        tool_specified="$LN"
8295        tool_basename="${tool_specified##*/}"
8296        if test "x$tool_basename" = "x$tool_specified"; then
8297          # A command without a complete path is provided, search $PATH.
8298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8299$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8300          # Extract the first word of "$tool_basename", so it can be a program name with args.
8301set dummy $tool_basename; ac_word=$2
8302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8303$as_echo_n "checking for $ac_word... " >&6; }
8304if ${ac_cv_path_LN+:} false; then :
8305  $as_echo_n "(cached) " >&6
8306else
8307  case $LN in
8308  [\\/]* | ?:[\\/]*)
8309  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8310  ;;
8311  *)
8312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8313for as_dir in $PATH
8314do
8315  IFS=$as_save_IFS
8316  test -z "$as_dir" && as_dir=.
8317    for ac_exec_ext in '' $ac_executable_extensions; do
8318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8319    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8321    break 2
8322  fi
8323done
8324  done
8325IFS=$as_save_IFS
8326
8327  ;;
8328esac
8329fi
8330LN=$ac_cv_path_LN
8331if test -n "$LN"; then
8332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8333$as_echo "$LN" >&6; }
8334else
8335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8336$as_echo "no" >&6; }
8337fi
8338
8339
8340          if test "x$LN" = x; then
8341            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8342          fi
8343        else
8344          # Otherwise we believe it is a complete path. Use it as it is.
8345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8346$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8347          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8348$as_echo_n "checking for LN... " >&6; }
8349          if test ! -x "$tool_specified"; then
8350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8351$as_echo "not found" >&6; }
8352            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8353          fi
8354          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8355$as_echo "$tool_specified" >&6; }
8356        fi
8357      fi
8358    fi
8359
8360  fi
8361
8362
8363
8364  if test "x$LN" = x; then
8365    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8366  fi
8367
8368
8369
8370
8371
8372  # Publish this variable in the help.
8373
8374
8375  if [ -z "${LS+x}" ]; then
8376    # The variable is not set by user, try to locate tool using the code snippet
8377    for ac_prog in ls
8378do
8379  # Extract the first word of "$ac_prog", so it can be a program name with args.
8380set dummy $ac_prog; ac_word=$2
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8382$as_echo_n "checking for $ac_word... " >&6; }
8383if ${ac_cv_path_LS+:} false; then :
8384  $as_echo_n "(cached) " >&6
8385else
8386  case $LS in
8387  [\\/]* | ?:[\\/]*)
8388  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8389  ;;
8390  *)
8391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392for as_dir in $PATH
8393do
8394  IFS=$as_save_IFS
8395  test -z "$as_dir" && as_dir=.
8396    for ac_exec_ext in '' $ac_executable_extensions; do
8397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400    break 2
8401  fi
8402done
8403  done
8404IFS=$as_save_IFS
8405
8406  ;;
8407esac
8408fi
8409LS=$ac_cv_path_LS
8410if test -n "$LS"; then
8411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8412$as_echo "$LS" >&6; }
8413else
8414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8415$as_echo "no" >&6; }
8416fi
8417
8418
8419  test -n "$LS" && break
8420done
8421
8422  else
8423    # The variable is set, but is it from the command line or the environment?
8424
8425    # Try to remove the string !LS! from our list.
8426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8428      # If it failed, the variable was not from the command line. Ignore it,
8429      # but warn the user (except for BASH, which is always set by the calling BASH).
8430      if test "xLS" != xBASH; then
8431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8432$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8433      fi
8434      # Try to locate tool using the code snippet
8435      for ac_prog in ls
8436do
8437  # Extract the first word of "$ac_prog", so it can be a program name with args.
8438set dummy $ac_prog; ac_word=$2
8439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8440$as_echo_n "checking for $ac_word... " >&6; }
8441if ${ac_cv_path_LS+:} false; then :
8442  $as_echo_n "(cached) " >&6
8443else
8444  case $LS in
8445  [\\/]* | ?:[\\/]*)
8446  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8447  ;;
8448  *)
8449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8450for as_dir in $PATH
8451do
8452  IFS=$as_save_IFS
8453  test -z "$as_dir" && as_dir=.
8454    for ac_exec_ext in '' $ac_executable_extensions; do
8455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8456    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8458    break 2
8459  fi
8460done
8461  done
8462IFS=$as_save_IFS
8463
8464  ;;
8465esac
8466fi
8467LS=$ac_cv_path_LS
8468if test -n "$LS"; then
8469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8470$as_echo "$LS" >&6; }
8471else
8472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8473$as_echo "no" >&6; }
8474fi
8475
8476
8477  test -n "$LS" && break
8478done
8479
8480    else
8481      # If it succeeded, then it was overridden by the user. We will use it
8482      # for the tool.
8483
8484      # First remove it from the list of overridden variables, so we can test
8485      # for unknown variables in the end.
8486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8487
8488      # Check if we try to supply an empty value
8489      if test "x$LS" = x; then
8490        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8491$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8493$as_echo_n "checking for LS... " >&6; }
8494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8495$as_echo "disabled" >&6; }
8496      else
8497        # Check if the provided tool contains a complete path.
8498        tool_specified="$LS"
8499        tool_basename="${tool_specified##*/}"
8500        if test "x$tool_basename" = "x$tool_specified"; then
8501          # A command without a complete path is provided, search $PATH.
8502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8503$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8504          # Extract the first word of "$tool_basename", so it can be a program name with args.
8505set dummy $tool_basename; ac_word=$2
8506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8507$as_echo_n "checking for $ac_word... " >&6; }
8508if ${ac_cv_path_LS+:} false; then :
8509  $as_echo_n "(cached) " >&6
8510else
8511  case $LS in
8512  [\\/]* | ?:[\\/]*)
8513  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8514  ;;
8515  *)
8516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8517for as_dir in $PATH
8518do
8519  IFS=$as_save_IFS
8520  test -z "$as_dir" && as_dir=.
8521    for ac_exec_ext in '' $ac_executable_extensions; do
8522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8523    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8525    break 2
8526  fi
8527done
8528  done
8529IFS=$as_save_IFS
8530
8531  ;;
8532esac
8533fi
8534LS=$ac_cv_path_LS
8535if test -n "$LS"; then
8536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8537$as_echo "$LS" >&6; }
8538else
8539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8540$as_echo "no" >&6; }
8541fi
8542
8543
8544          if test "x$LS" = x; then
8545            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8546          fi
8547        else
8548          # Otherwise we believe it is a complete path. Use it as it is.
8549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8550$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8551          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8552$as_echo_n "checking for LS... " >&6; }
8553          if test ! -x "$tool_specified"; then
8554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8555$as_echo "not found" >&6; }
8556            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8557          fi
8558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8559$as_echo "$tool_specified" >&6; }
8560        fi
8561      fi
8562    fi
8563
8564  fi
8565
8566
8567
8568  if test "x$LS" = x; then
8569    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8570  fi
8571
8572
8573
8574
8575
8576  # Publish this variable in the help.
8577
8578
8579  if [ -z "${MKDIR+x}" ]; then
8580    # The variable is not set by user, try to locate tool using the code snippet
8581    for ac_prog in mkdir
8582do
8583  # Extract the first word of "$ac_prog", so it can be a program name with args.
8584set dummy $ac_prog; ac_word=$2
8585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8586$as_echo_n "checking for $ac_word... " >&6; }
8587if ${ac_cv_path_MKDIR+:} false; then :
8588  $as_echo_n "(cached) " >&6
8589else
8590  case $MKDIR in
8591  [\\/]* | ?:[\\/]*)
8592  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8593  ;;
8594  *)
8595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8596for as_dir in $PATH
8597do
8598  IFS=$as_save_IFS
8599  test -z "$as_dir" && as_dir=.
8600    for ac_exec_ext in '' $ac_executable_extensions; do
8601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8602    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8604    break 2
8605  fi
8606done
8607  done
8608IFS=$as_save_IFS
8609
8610  ;;
8611esac
8612fi
8613MKDIR=$ac_cv_path_MKDIR
8614if test -n "$MKDIR"; then
8615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8616$as_echo "$MKDIR" >&6; }
8617else
8618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8619$as_echo "no" >&6; }
8620fi
8621
8622
8623  test -n "$MKDIR" && break
8624done
8625
8626  else
8627    # The variable is set, but is it from the command line or the environment?
8628
8629    # Try to remove the string !MKDIR! from our list.
8630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8632      # If it failed, the variable was not from the command line. Ignore it,
8633      # but warn the user (except for BASH, which is always set by the calling BASH).
8634      if test "xMKDIR" != xBASH; then
8635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8636$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8637      fi
8638      # Try to locate tool using the code snippet
8639      for ac_prog in mkdir
8640do
8641  # Extract the first word of "$ac_prog", so it can be a program name with args.
8642set dummy $ac_prog; ac_word=$2
8643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8644$as_echo_n "checking for $ac_word... " >&6; }
8645if ${ac_cv_path_MKDIR+:} false; then :
8646  $as_echo_n "(cached) " >&6
8647else
8648  case $MKDIR in
8649  [\\/]* | ?:[\\/]*)
8650  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8651  ;;
8652  *)
8653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8654for as_dir in $PATH
8655do
8656  IFS=$as_save_IFS
8657  test -z "$as_dir" && as_dir=.
8658    for ac_exec_ext in '' $ac_executable_extensions; do
8659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8660    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8662    break 2
8663  fi
8664done
8665  done
8666IFS=$as_save_IFS
8667
8668  ;;
8669esac
8670fi
8671MKDIR=$ac_cv_path_MKDIR
8672if test -n "$MKDIR"; then
8673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8674$as_echo "$MKDIR" >&6; }
8675else
8676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8677$as_echo "no" >&6; }
8678fi
8679
8680
8681  test -n "$MKDIR" && break
8682done
8683
8684    else
8685      # If it succeeded, then it was overridden by the user. We will use it
8686      # for the tool.
8687
8688      # First remove it from the list of overridden variables, so we can test
8689      # for unknown variables in the end.
8690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8691
8692      # Check if we try to supply an empty value
8693      if test "x$MKDIR" = x; then
8694        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8695$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8696        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8697$as_echo_n "checking for MKDIR... " >&6; }
8698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8699$as_echo "disabled" >&6; }
8700      else
8701        # Check if the provided tool contains a complete path.
8702        tool_specified="$MKDIR"
8703        tool_basename="${tool_specified##*/}"
8704        if test "x$tool_basename" = "x$tool_specified"; then
8705          # A command without a complete path is provided, search $PATH.
8706          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8707$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8708          # Extract the first word of "$tool_basename", so it can be a program name with args.
8709set dummy $tool_basename; ac_word=$2
8710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8711$as_echo_n "checking for $ac_word... " >&6; }
8712if ${ac_cv_path_MKDIR+:} false; then :
8713  $as_echo_n "(cached) " >&6
8714else
8715  case $MKDIR in
8716  [\\/]* | ?:[\\/]*)
8717  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8718  ;;
8719  *)
8720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8721for as_dir in $PATH
8722do
8723  IFS=$as_save_IFS
8724  test -z "$as_dir" && as_dir=.
8725    for ac_exec_ext in '' $ac_executable_extensions; do
8726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8727    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8729    break 2
8730  fi
8731done
8732  done
8733IFS=$as_save_IFS
8734
8735  ;;
8736esac
8737fi
8738MKDIR=$ac_cv_path_MKDIR
8739if test -n "$MKDIR"; then
8740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8741$as_echo "$MKDIR" >&6; }
8742else
8743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8744$as_echo "no" >&6; }
8745fi
8746
8747
8748          if test "x$MKDIR" = x; then
8749            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8750          fi
8751        else
8752          # Otherwise we believe it is a complete path. Use it as it is.
8753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8754$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8755          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8756$as_echo_n "checking for MKDIR... " >&6; }
8757          if test ! -x "$tool_specified"; then
8758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8759$as_echo "not found" >&6; }
8760            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8761          fi
8762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8763$as_echo "$tool_specified" >&6; }
8764        fi
8765      fi
8766    fi
8767
8768  fi
8769
8770
8771
8772  if test "x$MKDIR" = x; then
8773    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8774  fi
8775
8776
8777
8778
8779
8780  # Publish this variable in the help.
8781
8782
8783  if [ -z "${MKTEMP+x}" ]; then
8784    # The variable is not set by user, try to locate tool using the code snippet
8785    for ac_prog in mktemp
8786do
8787  # Extract the first word of "$ac_prog", so it can be a program name with args.
8788set dummy $ac_prog; ac_word=$2
8789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8790$as_echo_n "checking for $ac_word... " >&6; }
8791if ${ac_cv_path_MKTEMP+:} false; then :
8792  $as_echo_n "(cached) " >&6
8793else
8794  case $MKTEMP in
8795  [\\/]* | ?:[\\/]*)
8796  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8797  ;;
8798  *)
8799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8800for as_dir in $PATH
8801do
8802  IFS=$as_save_IFS
8803  test -z "$as_dir" && as_dir=.
8804    for ac_exec_ext in '' $ac_executable_extensions; do
8805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8806    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8808    break 2
8809  fi
8810done
8811  done
8812IFS=$as_save_IFS
8813
8814  ;;
8815esac
8816fi
8817MKTEMP=$ac_cv_path_MKTEMP
8818if test -n "$MKTEMP"; then
8819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8820$as_echo "$MKTEMP" >&6; }
8821else
8822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8823$as_echo "no" >&6; }
8824fi
8825
8826
8827  test -n "$MKTEMP" && break
8828done
8829
8830  else
8831    # The variable is set, but is it from the command line or the environment?
8832
8833    # Try to remove the string !MKTEMP! from our list.
8834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8836      # If it failed, the variable was not from the command line. Ignore it,
8837      # but warn the user (except for BASH, which is always set by the calling BASH).
8838      if test "xMKTEMP" != xBASH; then
8839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8840$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8841      fi
8842      # Try to locate tool using the code snippet
8843      for ac_prog in mktemp
8844do
8845  # Extract the first word of "$ac_prog", so it can be a program name with args.
8846set dummy $ac_prog; ac_word=$2
8847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8848$as_echo_n "checking for $ac_word... " >&6; }
8849if ${ac_cv_path_MKTEMP+:} false; then :
8850  $as_echo_n "(cached) " >&6
8851else
8852  case $MKTEMP in
8853  [\\/]* | ?:[\\/]*)
8854  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8855  ;;
8856  *)
8857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8858for as_dir in $PATH
8859do
8860  IFS=$as_save_IFS
8861  test -z "$as_dir" && as_dir=.
8862    for ac_exec_ext in '' $ac_executable_extensions; do
8863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8864    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8866    break 2
8867  fi
8868done
8869  done
8870IFS=$as_save_IFS
8871
8872  ;;
8873esac
8874fi
8875MKTEMP=$ac_cv_path_MKTEMP
8876if test -n "$MKTEMP"; then
8877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8878$as_echo "$MKTEMP" >&6; }
8879else
8880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8881$as_echo "no" >&6; }
8882fi
8883
8884
8885  test -n "$MKTEMP" && break
8886done
8887
8888    else
8889      # If it succeeded, then it was overridden by the user. We will use it
8890      # for the tool.
8891
8892      # First remove it from the list of overridden variables, so we can test
8893      # for unknown variables in the end.
8894      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8895
8896      # Check if we try to supply an empty value
8897      if test "x$MKTEMP" = x; then
8898        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8899$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8900        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8901$as_echo_n "checking for MKTEMP... " >&6; }
8902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8903$as_echo "disabled" >&6; }
8904      else
8905        # Check if the provided tool contains a complete path.
8906        tool_specified="$MKTEMP"
8907        tool_basename="${tool_specified##*/}"
8908        if test "x$tool_basename" = "x$tool_specified"; then
8909          # A command without a complete path is provided, search $PATH.
8910          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8911$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8912          # Extract the first word of "$tool_basename", so it can be a program name with args.
8913set dummy $tool_basename; ac_word=$2
8914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8915$as_echo_n "checking for $ac_word... " >&6; }
8916if ${ac_cv_path_MKTEMP+:} false; then :
8917  $as_echo_n "(cached) " >&6
8918else
8919  case $MKTEMP in
8920  [\\/]* | ?:[\\/]*)
8921  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8922  ;;
8923  *)
8924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8925for as_dir in $PATH
8926do
8927  IFS=$as_save_IFS
8928  test -z "$as_dir" && as_dir=.
8929    for ac_exec_ext in '' $ac_executable_extensions; do
8930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8931    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8933    break 2
8934  fi
8935done
8936  done
8937IFS=$as_save_IFS
8938
8939  ;;
8940esac
8941fi
8942MKTEMP=$ac_cv_path_MKTEMP
8943if test -n "$MKTEMP"; then
8944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8945$as_echo "$MKTEMP" >&6; }
8946else
8947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8948$as_echo "no" >&6; }
8949fi
8950
8951
8952          if test "x$MKTEMP" = x; then
8953            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8954          fi
8955        else
8956          # Otherwise we believe it is a complete path. Use it as it is.
8957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8958$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8959          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8960$as_echo_n "checking for MKTEMP... " >&6; }
8961          if test ! -x "$tool_specified"; then
8962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8963$as_echo "not found" >&6; }
8964            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8965          fi
8966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8967$as_echo "$tool_specified" >&6; }
8968        fi
8969      fi
8970    fi
8971
8972  fi
8973
8974
8975
8976  if test "x$MKTEMP" = x; then
8977    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8978  fi
8979
8980
8981
8982
8983
8984  # Publish this variable in the help.
8985
8986
8987  if [ -z "${MV+x}" ]; then
8988    # The variable is not set by user, try to locate tool using the code snippet
8989    for ac_prog in mv
8990do
8991  # Extract the first word of "$ac_prog", so it can be a program name with args.
8992set dummy $ac_prog; ac_word=$2
8993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8994$as_echo_n "checking for $ac_word... " >&6; }
8995if ${ac_cv_path_MV+:} false; then :
8996  $as_echo_n "(cached) " >&6
8997else
8998  case $MV in
8999  [\\/]* | ?:[\\/]*)
9000  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9001  ;;
9002  *)
9003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9004for as_dir in $PATH
9005do
9006  IFS=$as_save_IFS
9007  test -z "$as_dir" && as_dir=.
9008    for ac_exec_ext in '' $ac_executable_extensions; do
9009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9010    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9012    break 2
9013  fi
9014done
9015  done
9016IFS=$as_save_IFS
9017
9018  ;;
9019esac
9020fi
9021MV=$ac_cv_path_MV
9022if test -n "$MV"; then
9023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9024$as_echo "$MV" >&6; }
9025else
9026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9027$as_echo "no" >&6; }
9028fi
9029
9030
9031  test -n "$MV" && break
9032done
9033
9034  else
9035    # The variable is set, but is it from the command line or the environment?
9036
9037    # Try to remove the string !MV! from our list.
9038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9040      # If it failed, the variable was not from the command line. Ignore it,
9041      # but warn the user (except for BASH, which is always set by the calling BASH).
9042      if test "xMV" != xBASH; then
9043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9044$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9045      fi
9046      # Try to locate tool using the code snippet
9047      for ac_prog in mv
9048do
9049  # Extract the first word of "$ac_prog", so it can be a program name with args.
9050set dummy $ac_prog; ac_word=$2
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9052$as_echo_n "checking for $ac_word... " >&6; }
9053if ${ac_cv_path_MV+:} false; then :
9054  $as_echo_n "(cached) " >&6
9055else
9056  case $MV in
9057  [\\/]* | ?:[\\/]*)
9058  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9059  ;;
9060  *)
9061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9062for as_dir in $PATH
9063do
9064  IFS=$as_save_IFS
9065  test -z "$as_dir" && as_dir=.
9066    for ac_exec_ext in '' $ac_executable_extensions; do
9067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9068    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9070    break 2
9071  fi
9072done
9073  done
9074IFS=$as_save_IFS
9075
9076  ;;
9077esac
9078fi
9079MV=$ac_cv_path_MV
9080if test -n "$MV"; then
9081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9082$as_echo "$MV" >&6; }
9083else
9084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9085$as_echo "no" >&6; }
9086fi
9087
9088
9089  test -n "$MV" && break
9090done
9091
9092    else
9093      # If it succeeded, then it was overridden by the user. We will use it
9094      # for the tool.
9095
9096      # First remove it from the list of overridden variables, so we can test
9097      # for unknown variables in the end.
9098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9099
9100      # Check if we try to supply an empty value
9101      if test "x$MV" = x; then
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9103$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9105$as_echo_n "checking for MV... " >&6; }
9106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9107$as_echo "disabled" >&6; }
9108      else
9109        # Check if the provided tool contains a complete path.
9110        tool_specified="$MV"
9111        tool_basename="${tool_specified##*/}"
9112        if test "x$tool_basename" = "x$tool_specified"; then
9113          # A command without a complete path is provided, search $PATH.
9114          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9115$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9116          # Extract the first word of "$tool_basename", so it can be a program name with args.
9117set dummy $tool_basename; ac_word=$2
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9119$as_echo_n "checking for $ac_word... " >&6; }
9120if ${ac_cv_path_MV+:} false; then :
9121  $as_echo_n "(cached) " >&6
9122else
9123  case $MV in
9124  [\\/]* | ?:[\\/]*)
9125  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9126  ;;
9127  *)
9128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129for as_dir in $PATH
9130do
9131  IFS=$as_save_IFS
9132  test -z "$as_dir" && as_dir=.
9133    for ac_exec_ext in '' $ac_executable_extensions; do
9134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137    break 2
9138  fi
9139done
9140  done
9141IFS=$as_save_IFS
9142
9143  ;;
9144esac
9145fi
9146MV=$ac_cv_path_MV
9147if test -n "$MV"; then
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9149$as_echo "$MV" >&6; }
9150else
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
9153fi
9154
9155
9156          if test "x$MV" = x; then
9157            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9158          fi
9159        else
9160          # Otherwise we believe it is a complete path. Use it as it is.
9161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9162$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9163          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9164$as_echo_n "checking for MV... " >&6; }
9165          if test ! -x "$tool_specified"; then
9166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9167$as_echo "not found" >&6; }
9168            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9169          fi
9170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9171$as_echo "$tool_specified" >&6; }
9172        fi
9173      fi
9174    fi
9175
9176  fi
9177
9178
9179
9180  if test "x$MV" = x; then
9181    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9182  fi
9183
9184
9185
9186
9187
9188  # Publish this variable in the help.
9189
9190
9191  if [ -z "${NAWK+x}" ]; then
9192    # The variable is not set by user, try to locate tool using the code snippet
9193    for ac_prog in nawk gawk awk
9194do
9195  # Extract the first word of "$ac_prog", so it can be a program name with args.
9196set dummy $ac_prog; ac_word=$2
9197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9198$as_echo_n "checking for $ac_word... " >&6; }
9199if ${ac_cv_path_NAWK+:} false; then :
9200  $as_echo_n "(cached) " >&6
9201else
9202  case $NAWK in
9203  [\\/]* | ?:[\\/]*)
9204  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9205  ;;
9206  *)
9207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9208for as_dir in $PATH
9209do
9210  IFS=$as_save_IFS
9211  test -z "$as_dir" && as_dir=.
9212    for ac_exec_ext in '' $ac_executable_extensions; do
9213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9214    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9216    break 2
9217  fi
9218done
9219  done
9220IFS=$as_save_IFS
9221
9222  ;;
9223esac
9224fi
9225NAWK=$ac_cv_path_NAWK
9226if test -n "$NAWK"; then
9227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9228$as_echo "$NAWK" >&6; }
9229else
9230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9231$as_echo "no" >&6; }
9232fi
9233
9234
9235  test -n "$NAWK" && break
9236done
9237
9238  else
9239    # The variable is set, but is it from the command line or the environment?
9240
9241    # Try to remove the string !NAWK! from our list.
9242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9244      # If it failed, the variable was not from the command line. Ignore it,
9245      # but warn the user (except for BASH, which is always set by the calling BASH).
9246      if test "xNAWK" != xBASH; then
9247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9248$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9249      fi
9250      # Try to locate tool using the code snippet
9251      for ac_prog in nawk gawk awk
9252do
9253  # Extract the first word of "$ac_prog", so it can be a program name with args.
9254set dummy $ac_prog; ac_word=$2
9255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9256$as_echo_n "checking for $ac_word... " >&6; }
9257if ${ac_cv_path_NAWK+:} false; then :
9258  $as_echo_n "(cached) " >&6
9259else
9260  case $NAWK in
9261  [\\/]* | ?:[\\/]*)
9262  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9263  ;;
9264  *)
9265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9266for as_dir in $PATH
9267do
9268  IFS=$as_save_IFS
9269  test -z "$as_dir" && as_dir=.
9270    for ac_exec_ext in '' $ac_executable_extensions; do
9271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9272    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9274    break 2
9275  fi
9276done
9277  done
9278IFS=$as_save_IFS
9279
9280  ;;
9281esac
9282fi
9283NAWK=$ac_cv_path_NAWK
9284if test -n "$NAWK"; then
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9286$as_echo "$NAWK" >&6; }
9287else
9288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9289$as_echo "no" >&6; }
9290fi
9291
9292
9293  test -n "$NAWK" && break
9294done
9295
9296    else
9297      # If it succeeded, then it was overridden by the user. We will use it
9298      # for the tool.
9299
9300      # First remove it from the list of overridden variables, so we can test
9301      # for unknown variables in the end.
9302      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9303
9304      # Check if we try to supply an empty value
9305      if test "x$NAWK" = x; then
9306        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9307$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9308        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9309$as_echo_n "checking for NAWK... " >&6; }
9310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9311$as_echo "disabled" >&6; }
9312      else
9313        # Check if the provided tool contains a complete path.
9314        tool_specified="$NAWK"
9315        tool_basename="${tool_specified##*/}"
9316        if test "x$tool_basename" = "x$tool_specified"; then
9317          # A command without a complete path is provided, search $PATH.
9318          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9319$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9320          # Extract the first word of "$tool_basename", so it can be a program name with args.
9321set dummy $tool_basename; ac_word=$2
9322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9323$as_echo_n "checking for $ac_word... " >&6; }
9324if ${ac_cv_path_NAWK+:} false; then :
9325  $as_echo_n "(cached) " >&6
9326else
9327  case $NAWK in
9328  [\\/]* | ?:[\\/]*)
9329  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9330  ;;
9331  *)
9332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9333for as_dir in $PATH
9334do
9335  IFS=$as_save_IFS
9336  test -z "$as_dir" && as_dir=.
9337    for ac_exec_ext in '' $ac_executable_extensions; do
9338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9339    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9341    break 2
9342  fi
9343done
9344  done
9345IFS=$as_save_IFS
9346
9347  ;;
9348esac
9349fi
9350NAWK=$ac_cv_path_NAWK
9351if test -n "$NAWK"; then
9352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9353$as_echo "$NAWK" >&6; }
9354else
9355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9356$as_echo "no" >&6; }
9357fi
9358
9359
9360          if test "x$NAWK" = x; then
9361            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9362          fi
9363        else
9364          # Otherwise we believe it is a complete path. Use it as it is.
9365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9366$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9367          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9368$as_echo_n "checking for NAWK... " >&6; }
9369          if test ! -x "$tool_specified"; then
9370            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9371$as_echo "not found" >&6; }
9372            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9373          fi
9374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9375$as_echo "$tool_specified" >&6; }
9376        fi
9377      fi
9378    fi
9379
9380  fi
9381
9382
9383
9384  if test "x$NAWK" = x; then
9385    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9386  fi
9387
9388
9389
9390
9391
9392  # Publish this variable in the help.
9393
9394
9395  if [ -z "${PRINTF+x}" ]; then
9396    # The variable is not set by user, try to locate tool using the code snippet
9397    for ac_prog in printf
9398do
9399  # Extract the first word of "$ac_prog", so it can be a program name with args.
9400set dummy $ac_prog; ac_word=$2
9401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9402$as_echo_n "checking for $ac_word... " >&6; }
9403if ${ac_cv_path_PRINTF+:} false; then :
9404  $as_echo_n "(cached) " >&6
9405else
9406  case $PRINTF in
9407  [\\/]* | ?:[\\/]*)
9408  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9409  ;;
9410  *)
9411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9412for as_dir in $PATH
9413do
9414  IFS=$as_save_IFS
9415  test -z "$as_dir" && as_dir=.
9416    for ac_exec_ext in '' $ac_executable_extensions; do
9417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9418    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9420    break 2
9421  fi
9422done
9423  done
9424IFS=$as_save_IFS
9425
9426  ;;
9427esac
9428fi
9429PRINTF=$ac_cv_path_PRINTF
9430if test -n "$PRINTF"; then
9431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9432$as_echo "$PRINTF" >&6; }
9433else
9434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9435$as_echo "no" >&6; }
9436fi
9437
9438
9439  test -n "$PRINTF" && break
9440done
9441
9442  else
9443    # The variable is set, but is it from the command line or the environment?
9444
9445    # Try to remove the string !PRINTF! from our list.
9446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9448      # If it failed, the variable was not from the command line. Ignore it,
9449      # but warn the user (except for BASH, which is always set by the calling BASH).
9450      if test "xPRINTF" != xBASH; then
9451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9452$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9453      fi
9454      # Try to locate tool using the code snippet
9455      for ac_prog in printf
9456do
9457  # Extract the first word of "$ac_prog", so it can be a program name with args.
9458set dummy $ac_prog; ac_word=$2
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9460$as_echo_n "checking for $ac_word... " >&6; }
9461if ${ac_cv_path_PRINTF+:} false; then :
9462  $as_echo_n "(cached) " >&6
9463else
9464  case $PRINTF in
9465  [\\/]* | ?:[\\/]*)
9466  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9467  ;;
9468  *)
9469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9470for as_dir in $PATH
9471do
9472  IFS=$as_save_IFS
9473  test -z "$as_dir" && as_dir=.
9474    for ac_exec_ext in '' $ac_executable_extensions; do
9475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9476    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9478    break 2
9479  fi
9480done
9481  done
9482IFS=$as_save_IFS
9483
9484  ;;
9485esac
9486fi
9487PRINTF=$ac_cv_path_PRINTF
9488if test -n "$PRINTF"; then
9489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9490$as_echo "$PRINTF" >&6; }
9491else
9492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9493$as_echo "no" >&6; }
9494fi
9495
9496
9497  test -n "$PRINTF" && break
9498done
9499
9500    else
9501      # If it succeeded, then it was overridden by the user. We will use it
9502      # for the tool.
9503
9504      # First remove it from the list of overridden variables, so we can test
9505      # for unknown variables in the end.
9506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9507
9508      # Check if we try to supply an empty value
9509      if test "x$PRINTF" = x; then
9510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9511$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9513$as_echo_n "checking for PRINTF... " >&6; }
9514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9515$as_echo "disabled" >&6; }
9516      else
9517        # Check if the provided tool contains a complete path.
9518        tool_specified="$PRINTF"
9519        tool_basename="${tool_specified##*/}"
9520        if test "x$tool_basename" = "x$tool_specified"; then
9521          # A command without a complete path is provided, search $PATH.
9522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9523$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9524          # Extract the first word of "$tool_basename", so it can be a program name with args.
9525set dummy $tool_basename; ac_word=$2
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527$as_echo_n "checking for $ac_word... " >&6; }
9528if ${ac_cv_path_PRINTF+:} false; then :
9529  $as_echo_n "(cached) " >&6
9530else
9531  case $PRINTF in
9532  [\\/]* | ?:[\\/]*)
9533  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9534  ;;
9535  *)
9536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537for as_dir in $PATH
9538do
9539  IFS=$as_save_IFS
9540  test -z "$as_dir" && as_dir=.
9541    for ac_exec_ext in '' $ac_executable_extensions; do
9542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9543    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9545    break 2
9546  fi
9547done
9548  done
9549IFS=$as_save_IFS
9550
9551  ;;
9552esac
9553fi
9554PRINTF=$ac_cv_path_PRINTF
9555if test -n "$PRINTF"; then
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9557$as_echo "$PRINTF" >&6; }
9558else
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
9561fi
9562
9563
9564          if test "x$PRINTF" = x; then
9565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9566          fi
9567        else
9568          # Otherwise we believe it is a complete path. Use it as it is.
9569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9570$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9572$as_echo_n "checking for PRINTF... " >&6; }
9573          if test ! -x "$tool_specified"; then
9574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9575$as_echo "not found" >&6; }
9576            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9577          fi
9578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9579$as_echo "$tool_specified" >&6; }
9580        fi
9581      fi
9582    fi
9583
9584  fi
9585
9586
9587
9588  if test "x$PRINTF" = x; then
9589    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9590  fi
9591
9592
9593
9594
9595
9596  # Publish this variable in the help.
9597
9598
9599  if [ -z "${RM+x}" ]; then
9600    # The variable is not set by user, try to locate tool using the code snippet
9601    for ac_prog in rm
9602do
9603  # Extract the first word of "$ac_prog", so it can be a program name with args.
9604set dummy $ac_prog; ac_word=$2
9605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9606$as_echo_n "checking for $ac_word... " >&6; }
9607if ${ac_cv_path_RM+:} false; then :
9608  $as_echo_n "(cached) " >&6
9609else
9610  case $RM in
9611  [\\/]* | ?:[\\/]*)
9612  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9613  ;;
9614  *)
9615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9616for as_dir in $PATH
9617do
9618  IFS=$as_save_IFS
9619  test -z "$as_dir" && as_dir=.
9620    for ac_exec_ext in '' $ac_executable_extensions; do
9621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9622    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9624    break 2
9625  fi
9626done
9627  done
9628IFS=$as_save_IFS
9629
9630  ;;
9631esac
9632fi
9633RM=$ac_cv_path_RM
9634if test -n "$RM"; then
9635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9636$as_echo "$RM" >&6; }
9637else
9638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9639$as_echo "no" >&6; }
9640fi
9641
9642
9643  test -n "$RM" && break
9644done
9645
9646  else
9647    # The variable is set, but is it from the command line or the environment?
9648
9649    # Try to remove the string !RM! from our list.
9650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9652      # If it failed, the variable was not from the command line. Ignore it,
9653      # but warn the user (except for BASH, which is always set by the calling BASH).
9654      if test "xRM" != xBASH; then
9655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9656$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9657      fi
9658      # Try to locate tool using the code snippet
9659      for ac_prog in rm
9660do
9661  # Extract the first word of "$ac_prog", so it can be a program name with args.
9662set dummy $ac_prog; ac_word=$2
9663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9664$as_echo_n "checking for $ac_word... " >&6; }
9665if ${ac_cv_path_RM+:} false; then :
9666  $as_echo_n "(cached) " >&6
9667else
9668  case $RM in
9669  [\\/]* | ?:[\\/]*)
9670  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9671  ;;
9672  *)
9673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9674for as_dir in $PATH
9675do
9676  IFS=$as_save_IFS
9677  test -z "$as_dir" && as_dir=.
9678    for ac_exec_ext in '' $ac_executable_extensions; do
9679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9680    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9682    break 2
9683  fi
9684done
9685  done
9686IFS=$as_save_IFS
9687
9688  ;;
9689esac
9690fi
9691RM=$ac_cv_path_RM
9692if test -n "$RM"; then
9693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9694$as_echo "$RM" >&6; }
9695else
9696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9697$as_echo "no" >&6; }
9698fi
9699
9700
9701  test -n "$RM" && break
9702done
9703
9704    else
9705      # If it succeeded, then it was overridden by the user. We will use it
9706      # for the tool.
9707
9708      # First remove it from the list of overridden variables, so we can test
9709      # for unknown variables in the end.
9710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9711
9712      # Check if we try to supply an empty value
9713      if test "x$RM" = x; then
9714        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9715$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9717$as_echo_n "checking for RM... " >&6; }
9718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9719$as_echo "disabled" >&6; }
9720      else
9721        # Check if the provided tool contains a complete path.
9722        tool_specified="$RM"
9723        tool_basename="${tool_specified##*/}"
9724        if test "x$tool_basename" = "x$tool_specified"; then
9725          # A command without a complete path is provided, search $PATH.
9726          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9727$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9728          # Extract the first word of "$tool_basename", so it can be a program name with args.
9729set dummy $tool_basename; ac_word=$2
9730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9731$as_echo_n "checking for $ac_word... " >&6; }
9732if ${ac_cv_path_RM+:} false; then :
9733  $as_echo_n "(cached) " >&6
9734else
9735  case $RM in
9736  [\\/]* | ?:[\\/]*)
9737  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9738  ;;
9739  *)
9740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9741for as_dir in $PATH
9742do
9743  IFS=$as_save_IFS
9744  test -z "$as_dir" && as_dir=.
9745    for ac_exec_ext in '' $ac_executable_extensions; do
9746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9747    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9749    break 2
9750  fi
9751done
9752  done
9753IFS=$as_save_IFS
9754
9755  ;;
9756esac
9757fi
9758RM=$ac_cv_path_RM
9759if test -n "$RM"; then
9760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9761$as_echo "$RM" >&6; }
9762else
9763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9764$as_echo "no" >&6; }
9765fi
9766
9767
9768          if test "x$RM" = x; then
9769            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9770          fi
9771        else
9772          # Otherwise we believe it is a complete path. Use it as it is.
9773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9774$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9775          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9776$as_echo_n "checking for RM... " >&6; }
9777          if test ! -x "$tool_specified"; then
9778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9779$as_echo "not found" >&6; }
9780            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9781          fi
9782          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9783$as_echo "$tool_specified" >&6; }
9784        fi
9785      fi
9786    fi
9787
9788  fi
9789
9790
9791
9792  if test "x$RM" = x; then
9793    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9794  fi
9795
9796
9797
9798
9799
9800  # Publish this variable in the help.
9801
9802
9803  if [ -z "${RMDIR+x}" ]; then
9804    # The variable is not set by user, try to locate tool using the code snippet
9805    for ac_prog in rmdir
9806do
9807  # Extract the first word of "$ac_prog", so it can be a program name with args.
9808set dummy $ac_prog; ac_word=$2
9809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9810$as_echo_n "checking for $ac_word... " >&6; }
9811if ${ac_cv_path_RMDIR+:} false; then :
9812  $as_echo_n "(cached) " >&6
9813else
9814  case $RMDIR in
9815  [\\/]* | ?:[\\/]*)
9816  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9817  ;;
9818  *)
9819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9820for as_dir in $PATH
9821do
9822  IFS=$as_save_IFS
9823  test -z "$as_dir" && as_dir=.
9824    for ac_exec_ext in '' $ac_executable_extensions; do
9825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9826    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9828    break 2
9829  fi
9830done
9831  done
9832IFS=$as_save_IFS
9833
9834  ;;
9835esac
9836fi
9837RMDIR=$ac_cv_path_RMDIR
9838if test -n "$RMDIR"; then
9839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9840$as_echo "$RMDIR" >&6; }
9841else
9842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9843$as_echo "no" >&6; }
9844fi
9845
9846
9847  test -n "$RMDIR" && break
9848done
9849
9850  else
9851    # The variable is set, but is it from the command line or the environment?
9852
9853    # Try to remove the string !RMDIR! from our list.
9854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9856      # If it failed, the variable was not from the command line. Ignore it,
9857      # but warn the user (except for BASH, which is always set by the calling BASH).
9858      if test "xRMDIR" != xBASH; then
9859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9860$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9861      fi
9862      # Try to locate tool using the code snippet
9863      for ac_prog in rmdir
9864do
9865  # Extract the first word of "$ac_prog", so it can be a program name with args.
9866set dummy $ac_prog; ac_word=$2
9867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9868$as_echo_n "checking for $ac_word... " >&6; }
9869if ${ac_cv_path_RMDIR+:} false; then :
9870  $as_echo_n "(cached) " >&6
9871else
9872  case $RMDIR in
9873  [\\/]* | ?:[\\/]*)
9874  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9875  ;;
9876  *)
9877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9878for as_dir in $PATH
9879do
9880  IFS=$as_save_IFS
9881  test -z "$as_dir" && as_dir=.
9882    for ac_exec_ext in '' $ac_executable_extensions; do
9883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9884    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9886    break 2
9887  fi
9888done
9889  done
9890IFS=$as_save_IFS
9891
9892  ;;
9893esac
9894fi
9895RMDIR=$ac_cv_path_RMDIR
9896if test -n "$RMDIR"; then
9897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9898$as_echo "$RMDIR" >&6; }
9899else
9900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901$as_echo "no" >&6; }
9902fi
9903
9904
9905  test -n "$RMDIR" && break
9906done
9907
9908    else
9909      # If it succeeded, then it was overridden by the user. We will use it
9910      # for the tool.
9911
9912      # First remove it from the list of overridden variables, so we can test
9913      # for unknown variables in the end.
9914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9915
9916      # Check if we try to supply an empty value
9917      if test "x$RMDIR" = x; then
9918        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9919$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9921$as_echo_n "checking for RMDIR... " >&6; }
9922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9923$as_echo "disabled" >&6; }
9924      else
9925        # Check if the provided tool contains a complete path.
9926        tool_specified="$RMDIR"
9927        tool_basename="${tool_specified##*/}"
9928        if test "x$tool_basename" = "x$tool_specified"; then
9929          # A command without a complete path is provided, search $PATH.
9930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9931$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9932          # Extract the first word of "$tool_basename", so it can be a program name with args.
9933set dummy $tool_basename; ac_word=$2
9934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9935$as_echo_n "checking for $ac_word... " >&6; }
9936if ${ac_cv_path_RMDIR+:} false; then :
9937  $as_echo_n "(cached) " >&6
9938else
9939  case $RMDIR in
9940  [\\/]* | ?:[\\/]*)
9941  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9942  ;;
9943  *)
9944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9945for as_dir in $PATH
9946do
9947  IFS=$as_save_IFS
9948  test -z "$as_dir" && as_dir=.
9949    for ac_exec_ext in '' $ac_executable_extensions; do
9950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9951    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9953    break 2
9954  fi
9955done
9956  done
9957IFS=$as_save_IFS
9958
9959  ;;
9960esac
9961fi
9962RMDIR=$ac_cv_path_RMDIR
9963if test -n "$RMDIR"; then
9964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9965$as_echo "$RMDIR" >&6; }
9966else
9967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9968$as_echo "no" >&6; }
9969fi
9970
9971
9972          if test "x$RMDIR" = x; then
9973            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9974          fi
9975        else
9976          # Otherwise we believe it is a complete path. Use it as it is.
9977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9978$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9979          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9980$as_echo_n "checking for RMDIR... " >&6; }
9981          if test ! -x "$tool_specified"; then
9982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9983$as_echo "not found" >&6; }
9984            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9985          fi
9986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9987$as_echo "$tool_specified" >&6; }
9988        fi
9989      fi
9990    fi
9991
9992  fi
9993
9994
9995
9996  if test "x$RMDIR" = x; then
9997    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9998  fi
9999
10000
10001
10002
10003
10004  # Publish this variable in the help.
10005
10006
10007  if [ -z "${SH+x}" ]; then
10008    # The variable is not set by user, try to locate tool using the code snippet
10009    for ac_prog in sh
10010do
10011  # Extract the first word of "$ac_prog", so it can be a program name with args.
10012set dummy $ac_prog; ac_word=$2
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10014$as_echo_n "checking for $ac_word... " >&6; }
10015if ${ac_cv_path_SH+:} false; then :
10016  $as_echo_n "(cached) " >&6
10017else
10018  case $SH in
10019  [\\/]* | ?:[\\/]*)
10020  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10021  ;;
10022  *)
10023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10024for as_dir in $PATH
10025do
10026  IFS=$as_save_IFS
10027  test -z "$as_dir" && as_dir=.
10028    for ac_exec_ext in '' $ac_executable_extensions; do
10029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10030    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10032    break 2
10033  fi
10034done
10035  done
10036IFS=$as_save_IFS
10037
10038  ;;
10039esac
10040fi
10041SH=$ac_cv_path_SH
10042if test -n "$SH"; then
10043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10044$as_echo "$SH" >&6; }
10045else
10046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10047$as_echo "no" >&6; }
10048fi
10049
10050
10051  test -n "$SH" && break
10052done
10053
10054  else
10055    # The variable is set, but is it from the command line or the environment?
10056
10057    # Try to remove the string !SH! from our list.
10058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10060      # If it failed, the variable was not from the command line. Ignore it,
10061      # but warn the user (except for BASH, which is always set by the calling BASH).
10062      if test "xSH" != xBASH; then
10063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10064$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10065      fi
10066      # Try to locate tool using the code snippet
10067      for ac_prog in sh
10068do
10069  # Extract the first word of "$ac_prog", so it can be a program name with args.
10070set dummy $ac_prog; ac_word=$2
10071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10072$as_echo_n "checking for $ac_word... " >&6; }
10073if ${ac_cv_path_SH+:} false; then :
10074  $as_echo_n "(cached) " >&6
10075else
10076  case $SH in
10077  [\\/]* | ?:[\\/]*)
10078  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10079  ;;
10080  *)
10081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10082for as_dir in $PATH
10083do
10084  IFS=$as_save_IFS
10085  test -z "$as_dir" && as_dir=.
10086    for ac_exec_ext in '' $ac_executable_extensions; do
10087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10088    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10090    break 2
10091  fi
10092done
10093  done
10094IFS=$as_save_IFS
10095
10096  ;;
10097esac
10098fi
10099SH=$ac_cv_path_SH
10100if test -n "$SH"; then
10101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10102$as_echo "$SH" >&6; }
10103else
10104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10105$as_echo "no" >&6; }
10106fi
10107
10108
10109  test -n "$SH" && break
10110done
10111
10112    else
10113      # If it succeeded, then it was overridden by the user. We will use it
10114      # for the tool.
10115
10116      # First remove it from the list of overridden variables, so we can test
10117      # for unknown variables in the end.
10118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10119
10120      # Check if we try to supply an empty value
10121      if test "x$SH" = x; then
10122        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10123$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10124        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10125$as_echo_n "checking for SH... " >&6; }
10126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10127$as_echo "disabled" >&6; }
10128      else
10129        # Check if the provided tool contains a complete path.
10130        tool_specified="$SH"
10131        tool_basename="${tool_specified##*/}"
10132        if test "x$tool_basename" = "x$tool_specified"; then
10133          # A command without a complete path is provided, search $PATH.
10134          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10135$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10136          # Extract the first word of "$tool_basename", so it can be a program name with args.
10137set dummy $tool_basename; ac_word=$2
10138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10139$as_echo_n "checking for $ac_word... " >&6; }
10140if ${ac_cv_path_SH+:} false; then :
10141  $as_echo_n "(cached) " >&6
10142else
10143  case $SH in
10144  [\\/]* | ?:[\\/]*)
10145  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10146  ;;
10147  *)
10148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10149for as_dir in $PATH
10150do
10151  IFS=$as_save_IFS
10152  test -z "$as_dir" && as_dir=.
10153    for ac_exec_ext in '' $ac_executable_extensions; do
10154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10155    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10157    break 2
10158  fi
10159done
10160  done
10161IFS=$as_save_IFS
10162
10163  ;;
10164esac
10165fi
10166SH=$ac_cv_path_SH
10167if test -n "$SH"; then
10168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10169$as_echo "$SH" >&6; }
10170else
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10172$as_echo "no" >&6; }
10173fi
10174
10175
10176          if test "x$SH" = x; then
10177            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10178          fi
10179        else
10180          # Otherwise we believe it is a complete path. Use it as it is.
10181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10182$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10183          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10184$as_echo_n "checking for SH... " >&6; }
10185          if test ! -x "$tool_specified"; then
10186            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10187$as_echo "not found" >&6; }
10188            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10189          fi
10190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10191$as_echo "$tool_specified" >&6; }
10192        fi
10193      fi
10194    fi
10195
10196  fi
10197
10198
10199
10200  if test "x$SH" = x; then
10201    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10202  fi
10203
10204
10205
10206
10207
10208  # Publish this variable in the help.
10209
10210
10211  if [ -z "${SORT+x}" ]; then
10212    # The variable is not set by user, try to locate tool using the code snippet
10213    for ac_prog in sort
10214do
10215  # Extract the first word of "$ac_prog", so it can be a program name with args.
10216set dummy $ac_prog; ac_word=$2
10217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10218$as_echo_n "checking for $ac_word... " >&6; }
10219if ${ac_cv_path_SORT+:} false; then :
10220  $as_echo_n "(cached) " >&6
10221else
10222  case $SORT in
10223  [\\/]* | ?:[\\/]*)
10224  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10225  ;;
10226  *)
10227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10228for as_dir in $PATH
10229do
10230  IFS=$as_save_IFS
10231  test -z "$as_dir" && as_dir=.
10232    for ac_exec_ext in '' $ac_executable_extensions; do
10233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10234    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10236    break 2
10237  fi
10238done
10239  done
10240IFS=$as_save_IFS
10241
10242  ;;
10243esac
10244fi
10245SORT=$ac_cv_path_SORT
10246if test -n "$SORT"; then
10247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10248$as_echo "$SORT" >&6; }
10249else
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
10252fi
10253
10254
10255  test -n "$SORT" && break
10256done
10257
10258  else
10259    # The variable is set, but is it from the command line or the environment?
10260
10261    # Try to remove the string !SORT! from our list.
10262    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10263    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10264      # If it failed, the variable was not from the command line. Ignore it,
10265      # but warn the user (except for BASH, which is always set by the calling BASH).
10266      if test "xSORT" != xBASH; then
10267        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10268$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10269      fi
10270      # Try to locate tool using the code snippet
10271      for ac_prog in sort
10272do
10273  # Extract the first word of "$ac_prog", so it can be a program name with args.
10274set dummy $ac_prog; ac_word=$2
10275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10276$as_echo_n "checking for $ac_word... " >&6; }
10277if ${ac_cv_path_SORT+:} false; then :
10278  $as_echo_n "(cached) " >&6
10279else
10280  case $SORT in
10281  [\\/]* | ?:[\\/]*)
10282  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10283  ;;
10284  *)
10285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10286for as_dir in $PATH
10287do
10288  IFS=$as_save_IFS
10289  test -z "$as_dir" && as_dir=.
10290    for ac_exec_ext in '' $ac_executable_extensions; do
10291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10292    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10294    break 2
10295  fi
10296done
10297  done
10298IFS=$as_save_IFS
10299
10300  ;;
10301esac
10302fi
10303SORT=$ac_cv_path_SORT
10304if test -n "$SORT"; then
10305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10306$as_echo "$SORT" >&6; }
10307else
10308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10309$as_echo "no" >&6; }
10310fi
10311
10312
10313  test -n "$SORT" && break
10314done
10315
10316    else
10317      # If it succeeded, then it was overridden by the user. We will use it
10318      # for the tool.
10319
10320      # First remove it from the list of overridden variables, so we can test
10321      # for unknown variables in the end.
10322      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10323
10324      # Check if we try to supply an empty value
10325      if test "x$SORT" = x; then
10326        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10327$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10329$as_echo_n "checking for SORT... " >&6; }
10330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10331$as_echo "disabled" >&6; }
10332      else
10333        # Check if the provided tool contains a complete path.
10334        tool_specified="$SORT"
10335        tool_basename="${tool_specified##*/}"
10336        if test "x$tool_basename" = "x$tool_specified"; then
10337          # A command without a complete path is provided, search $PATH.
10338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10339$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10340          # Extract the first word of "$tool_basename", so it can be a program name with args.
10341set dummy $tool_basename; ac_word=$2
10342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10343$as_echo_n "checking for $ac_word... " >&6; }
10344if ${ac_cv_path_SORT+:} false; then :
10345  $as_echo_n "(cached) " >&6
10346else
10347  case $SORT in
10348  [\\/]* | ?:[\\/]*)
10349  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10350  ;;
10351  *)
10352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10353for as_dir in $PATH
10354do
10355  IFS=$as_save_IFS
10356  test -z "$as_dir" && as_dir=.
10357    for ac_exec_ext in '' $ac_executable_extensions; do
10358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10359    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10361    break 2
10362  fi
10363done
10364  done
10365IFS=$as_save_IFS
10366
10367  ;;
10368esac
10369fi
10370SORT=$ac_cv_path_SORT
10371if test -n "$SORT"; then
10372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10373$as_echo "$SORT" >&6; }
10374else
10375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10376$as_echo "no" >&6; }
10377fi
10378
10379
10380          if test "x$SORT" = x; then
10381            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10382          fi
10383        else
10384          # Otherwise we believe it is a complete path. Use it as it is.
10385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10386$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10387          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10388$as_echo_n "checking for SORT... " >&6; }
10389          if test ! -x "$tool_specified"; then
10390            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10391$as_echo "not found" >&6; }
10392            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10393          fi
10394          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10395$as_echo "$tool_specified" >&6; }
10396        fi
10397      fi
10398    fi
10399
10400  fi
10401
10402
10403
10404  if test "x$SORT" = x; then
10405    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10406  fi
10407
10408
10409
10410
10411
10412  # Publish this variable in the help.
10413
10414
10415  if [ -z "${TAIL+x}" ]; then
10416    # The variable is not set by user, try to locate tool using the code snippet
10417    for ac_prog in tail
10418do
10419  # Extract the first word of "$ac_prog", so it can be a program name with args.
10420set dummy $ac_prog; ac_word=$2
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10422$as_echo_n "checking for $ac_word... " >&6; }
10423if ${ac_cv_path_TAIL+:} false; then :
10424  $as_echo_n "(cached) " >&6
10425else
10426  case $TAIL in
10427  [\\/]* | ?:[\\/]*)
10428  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10429  ;;
10430  *)
10431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10432for as_dir in $PATH
10433do
10434  IFS=$as_save_IFS
10435  test -z "$as_dir" && as_dir=.
10436    for ac_exec_ext in '' $ac_executable_extensions; do
10437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10438    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10440    break 2
10441  fi
10442done
10443  done
10444IFS=$as_save_IFS
10445
10446  ;;
10447esac
10448fi
10449TAIL=$ac_cv_path_TAIL
10450if test -n "$TAIL"; then
10451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10452$as_echo "$TAIL" >&6; }
10453else
10454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10455$as_echo "no" >&6; }
10456fi
10457
10458
10459  test -n "$TAIL" && break
10460done
10461
10462  else
10463    # The variable is set, but is it from the command line or the environment?
10464
10465    # Try to remove the string !TAIL! from our list.
10466    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10467    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10468      # If it failed, the variable was not from the command line. Ignore it,
10469      # but warn the user (except for BASH, which is always set by the calling BASH).
10470      if test "xTAIL" != xBASH; then
10471        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10472$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10473      fi
10474      # Try to locate tool using the code snippet
10475      for ac_prog in tail
10476do
10477  # Extract the first word of "$ac_prog", so it can be a program name with args.
10478set dummy $ac_prog; ac_word=$2
10479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10480$as_echo_n "checking for $ac_word... " >&6; }
10481if ${ac_cv_path_TAIL+:} false; then :
10482  $as_echo_n "(cached) " >&6
10483else
10484  case $TAIL in
10485  [\\/]* | ?:[\\/]*)
10486  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10487  ;;
10488  *)
10489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10490for as_dir in $PATH
10491do
10492  IFS=$as_save_IFS
10493  test -z "$as_dir" && as_dir=.
10494    for ac_exec_ext in '' $ac_executable_extensions; do
10495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10496    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10498    break 2
10499  fi
10500done
10501  done
10502IFS=$as_save_IFS
10503
10504  ;;
10505esac
10506fi
10507TAIL=$ac_cv_path_TAIL
10508if test -n "$TAIL"; then
10509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10510$as_echo "$TAIL" >&6; }
10511else
10512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10513$as_echo "no" >&6; }
10514fi
10515
10516
10517  test -n "$TAIL" && break
10518done
10519
10520    else
10521      # If it succeeded, then it was overridden by the user. We will use it
10522      # for the tool.
10523
10524      # First remove it from the list of overridden variables, so we can test
10525      # for unknown variables in the end.
10526      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10527
10528      # Check if we try to supply an empty value
10529      if test "x$TAIL" = x; then
10530        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10531$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10533$as_echo_n "checking for TAIL... " >&6; }
10534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10535$as_echo "disabled" >&6; }
10536      else
10537        # Check if the provided tool contains a complete path.
10538        tool_specified="$TAIL"
10539        tool_basename="${tool_specified##*/}"
10540        if test "x$tool_basename" = "x$tool_specified"; then
10541          # A command without a complete path is provided, search $PATH.
10542          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10543$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10544          # Extract the first word of "$tool_basename", so it can be a program name with args.
10545set dummy $tool_basename; ac_word=$2
10546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10547$as_echo_n "checking for $ac_word... " >&6; }
10548if ${ac_cv_path_TAIL+:} false; then :
10549  $as_echo_n "(cached) " >&6
10550else
10551  case $TAIL in
10552  [\\/]* | ?:[\\/]*)
10553  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10554  ;;
10555  *)
10556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10557for as_dir in $PATH
10558do
10559  IFS=$as_save_IFS
10560  test -z "$as_dir" && as_dir=.
10561    for ac_exec_ext in '' $ac_executable_extensions; do
10562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10563    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10565    break 2
10566  fi
10567done
10568  done
10569IFS=$as_save_IFS
10570
10571  ;;
10572esac
10573fi
10574TAIL=$ac_cv_path_TAIL
10575if test -n "$TAIL"; then
10576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10577$as_echo "$TAIL" >&6; }
10578else
10579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10580$as_echo "no" >&6; }
10581fi
10582
10583
10584          if test "x$TAIL" = x; then
10585            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10586          fi
10587        else
10588          # Otherwise we believe it is a complete path. Use it as it is.
10589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10590$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10591          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10592$as_echo_n "checking for TAIL... " >&6; }
10593          if test ! -x "$tool_specified"; then
10594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10595$as_echo "not found" >&6; }
10596            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10597          fi
10598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10599$as_echo "$tool_specified" >&6; }
10600        fi
10601      fi
10602    fi
10603
10604  fi
10605
10606
10607
10608  if test "x$TAIL" = x; then
10609    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10610  fi
10611
10612
10613
10614
10615
10616  # Publish this variable in the help.
10617
10618
10619  if [ -z "${TAR+x}" ]; then
10620    # The variable is not set by user, try to locate tool using the code snippet
10621    for ac_prog in tar
10622do
10623  # Extract the first word of "$ac_prog", so it can be a program name with args.
10624set dummy $ac_prog; ac_word=$2
10625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10626$as_echo_n "checking for $ac_word... " >&6; }
10627if ${ac_cv_path_TAR+:} false; then :
10628  $as_echo_n "(cached) " >&6
10629else
10630  case $TAR in
10631  [\\/]* | ?:[\\/]*)
10632  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10633  ;;
10634  *)
10635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10636for as_dir in $PATH
10637do
10638  IFS=$as_save_IFS
10639  test -z "$as_dir" && as_dir=.
10640    for ac_exec_ext in '' $ac_executable_extensions; do
10641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10642    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10644    break 2
10645  fi
10646done
10647  done
10648IFS=$as_save_IFS
10649
10650  ;;
10651esac
10652fi
10653TAR=$ac_cv_path_TAR
10654if test -n "$TAR"; then
10655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10656$as_echo "$TAR" >&6; }
10657else
10658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659$as_echo "no" >&6; }
10660fi
10661
10662
10663  test -n "$TAR" && break
10664done
10665
10666  else
10667    # The variable is set, but is it from the command line or the environment?
10668
10669    # Try to remove the string !TAR! from our list.
10670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10672      # If it failed, the variable was not from the command line. Ignore it,
10673      # but warn the user (except for BASH, which is always set by the calling BASH).
10674      if test "xTAR" != xBASH; then
10675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10676$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10677      fi
10678      # Try to locate tool using the code snippet
10679      for ac_prog in tar
10680do
10681  # Extract the first word of "$ac_prog", so it can be a program name with args.
10682set dummy $ac_prog; ac_word=$2
10683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10684$as_echo_n "checking for $ac_word... " >&6; }
10685if ${ac_cv_path_TAR+:} false; then :
10686  $as_echo_n "(cached) " >&6
10687else
10688  case $TAR in
10689  [\\/]* | ?:[\\/]*)
10690  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10691  ;;
10692  *)
10693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10694for as_dir in $PATH
10695do
10696  IFS=$as_save_IFS
10697  test -z "$as_dir" && as_dir=.
10698    for ac_exec_ext in '' $ac_executable_extensions; do
10699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10700    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10702    break 2
10703  fi
10704done
10705  done
10706IFS=$as_save_IFS
10707
10708  ;;
10709esac
10710fi
10711TAR=$ac_cv_path_TAR
10712if test -n "$TAR"; then
10713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10714$as_echo "$TAR" >&6; }
10715else
10716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10717$as_echo "no" >&6; }
10718fi
10719
10720
10721  test -n "$TAR" && break
10722done
10723
10724    else
10725      # If it succeeded, then it was overridden by the user. We will use it
10726      # for the tool.
10727
10728      # First remove it from the list of overridden variables, so we can test
10729      # for unknown variables in the end.
10730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10731
10732      # Check if we try to supply an empty value
10733      if test "x$TAR" = x; then
10734        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10735$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10737$as_echo_n "checking for TAR... " >&6; }
10738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10739$as_echo "disabled" >&6; }
10740      else
10741        # Check if the provided tool contains a complete path.
10742        tool_specified="$TAR"
10743        tool_basename="${tool_specified##*/}"
10744        if test "x$tool_basename" = "x$tool_specified"; then
10745          # A command without a complete path is provided, search $PATH.
10746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10747$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10748          # Extract the first word of "$tool_basename", so it can be a program name with args.
10749set dummy $tool_basename; ac_word=$2
10750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10751$as_echo_n "checking for $ac_word... " >&6; }
10752if ${ac_cv_path_TAR+:} false; then :
10753  $as_echo_n "(cached) " >&6
10754else
10755  case $TAR in
10756  [\\/]* | ?:[\\/]*)
10757  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10758  ;;
10759  *)
10760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10761for as_dir in $PATH
10762do
10763  IFS=$as_save_IFS
10764  test -z "$as_dir" && as_dir=.
10765    for ac_exec_ext in '' $ac_executable_extensions; do
10766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10767    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10769    break 2
10770  fi
10771done
10772  done
10773IFS=$as_save_IFS
10774
10775  ;;
10776esac
10777fi
10778TAR=$ac_cv_path_TAR
10779if test -n "$TAR"; then
10780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10781$as_echo "$TAR" >&6; }
10782else
10783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10784$as_echo "no" >&6; }
10785fi
10786
10787
10788          if test "x$TAR" = x; then
10789            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10790          fi
10791        else
10792          # Otherwise we believe it is a complete path. Use it as it is.
10793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10794$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10795          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10796$as_echo_n "checking for TAR... " >&6; }
10797          if test ! -x "$tool_specified"; then
10798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10799$as_echo "not found" >&6; }
10800            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10801          fi
10802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10803$as_echo "$tool_specified" >&6; }
10804        fi
10805      fi
10806    fi
10807
10808  fi
10809
10810
10811
10812  if test "x$TAR" = x; then
10813    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10814  fi
10815
10816
10817
10818
10819
10820  # Publish this variable in the help.
10821
10822
10823  if [ -z "${TEE+x}" ]; then
10824    # The variable is not set by user, try to locate tool using the code snippet
10825    for ac_prog in tee
10826do
10827  # Extract the first word of "$ac_prog", so it can be a program name with args.
10828set dummy $ac_prog; ac_word=$2
10829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10830$as_echo_n "checking for $ac_word... " >&6; }
10831if ${ac_cv_path_TEE+:} false; then :
10832  $as_echo_n "(cached) " >&6
10833else
10834  case $TEE in
10835  [\\/]* | ?:[\\/]*)
10836  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10837  ;;
10838  *)
10839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10840for as_dir in $PATH
10841do
10842  IFS=$as_save_IFS
10843  test -z "$as_dir" && as_dir=.
10844    for ac_exec_ext in '' $ac_executable_extensions; do
10845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10846    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10848    break 2
10849  fi
10850done
10851  done
10852IFS=$as_save_IFS
10853
10854  ;;
10855esac
10856fi
10857TEE=$ac_cv_path_TEE
10858if test -n "$TEE"; then
10859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10860$as_echo "$TEE" >&6; }
10861else
10862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10863$as_echo "no" >&6; }
10864fi
10865
10866
10867  test -n "$TEE" && break
10868done
10869
10870  else
10871    # The variable is set, but is it from the command line or the environment?
10872
10873    # Try to remove the string !TEE! from our list.
10874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10876      # If it failed, the variable was not from the command line. Ignore it,
10877      # but warn the user (except for BASH, which is always set by the calling BASH).
10878      if test "xTEE" != xBASH; then
10879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10880$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10881      fi
10882      # Try to locate tool using the code snippet
10883      for ac_prog in tee
10884do
10885  # Extract the first word of "$ac_prog", so it can be a program name with args.
10886set dummy $ac_prog; ac_word=$2
10887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10888$as_echo_n "checking for $ac_word... " >&6; }
10889if ${ac_cv_path_TEE+:} false; then :
10890  $as_echo_n "(cached) " >&6
10891else
10892  case $TEE in
10893  [\\/]* | ?:[\\/]*)
10894  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10895  ;;
10896  *)
10897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10898for as_dir in $PATH
10899do
10900  IFS=$as_save_IFS
10901  test -z "$as_dir" && as_dir=.
10902    for ac_exec_ext in '' $ac_executable_extensions; do
10903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10904    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10906    break 2
10907  fi
10908done
10909  done
10910IFS=$as_save_IFS
10911
10912  ;;
10913esac
10914fi
10915TEE=$ac_cv_path_TEE
10916if test -n "$TEE"; then
10917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10918$as_echo "$TEE" >&6; }
10919else
10920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10921$as_echo "no" >&6; }
10922fi
10923
10924
10925  test -n "$TEE" && break
10926done
10927
10928    else
10929      # If it succeeded, then it was overridden by the user. We will use it
10930      # for the tool.
10931
10932      # First remove it from the list of overridden variables, so we can test
10933      # for unknown variables in the end.
10934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10935
10936      # Check if we try to supply an empty value
10937      if test "x$TEE" = x; then
10938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10939$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10941$as_echo_n "checking for TEE... " >&6; }
10942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10943$as_echo "disabled" >&6; }
10944      else
10945        # Check if the provided tool contains a complete path.
10946        tool_specified="$TEE"
10947        tool_basename="${tool_specified##*/}"
10948        if test "x$tool_basename" = "x$tool_specified"; then
10949          # A command without a complete path is provided, search $PATH.
10950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10951$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10952          # Extract the first word of "$tool_basename", so it can be a program name with args.
10953set dummy $tool_basename; ac_word=$2
10954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10955$as_echo_n "checking for $ac_word... " >&6; }
10956if ${ac_cv_path_TEE+:} false; then :
10957  $as_echo_n "(cached) " >&6
10958else
10959  case $TEE in
10960  [\\/]* | ?:[\\/]*)
10961  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10962  ;;
10963  *)
10964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10965for as_dir in $PATH
10966do
10967  IFS=$as_save_IFS
10968  test -z "$as_dir" && as_dir=.
10969    for ac_exec_ext in '' $ac_executable_extensions; do
10970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10971    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10973    break 2
10974  fi
10975done
10976  done
10977IFS=$as_save_IFS
10978
10979  ;;
10980esac
10981fi
10982TEE=$ac_cv_path_TEE
10983if test -n "$TEE"; then
10984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10985$as_echo "$TEE" >&6; }
10986else
10987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
10989fi
10990
10991
10992          if test "x$TEE" = x; then
10993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10994          fi
10995        else
10996          # Otherwise we believe it is a complete path. Use it as it is.
10997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10998$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11000$as_echo_n "checking for TEE... " >&6; }
11001          if test ! -x "$tool_specified"; then
11002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11003$as_echo "not found" >&6; }
11004            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11005          fi
11006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11007$as_echo "$tool_specified" >&6; }
11008        fi
11009      fi
11010    fi
11011
11012  fi
11013
11014
11015
11016  if test "x$TEE" = x; then
11017    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11018  fi
11019
11020
11021
11022
11023
11024  # Publish this variable in the help.
11025
11026
11027  if [ -z "${TOUCH+x}" ]; then
11028    # The variable is not set by user, try to locate tool using the code snippet
11029    for ac_prog in touch
11030do
11031  # Extract the first word of "$ac_prog", so it can be a program name with args.
11032set dummy $ac_prog; ac_word=$2
11033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11034$as_echo_n "checking for $ac_word... " >&6; }
11035if ${ac_cv_path_TOUCH+:} false; then :
11036  $as_echo_n "(cached) " >&6
11037else
11038  case $TOUCH in
11039  [\\/]* | ?:[\\/]*)
11040  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11041  ;;
11042  *)
11043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11044for as_dir in $PATH
11045do
11046  IFS=$as_save_IFS
11047  test -z "$as_dir" && as_dir=.
11048    for ac_exec_ext in '' $ac_executable_extensions; do
11049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11050    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11052    break 2
11053  fi
11054done
11055  done
11056IFS=$as_save_IFS
11057
11058  ;;
11059esac
11060fi
11061TOUCH=$ac_cv_path_TOUCH
11062if test -n "$TOUCH"; then
11063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11064$as_echo "$TOUCH" >&6; }
11065else
11066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11067$as_echo "no" >&6; }
11068fi
11069
11070
11071  test -n "$TOUCH" && break
11072done
11073
11074  else
11075    # The variable is set, but is it from the command line or the environment?
11076
11077    # Try to remove the string !TOUCH! from our list.
11078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11080      # If it failed, the variable was not from the command line. Ignore it,
11081      # but warn the user (except for BASH, which is always set by the calling BASH).
11082      if test "xTOUCH" != xBASH; then
11083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11084$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11085      fi
11086      # Try to locate tool using the code snippet
11087      for ac_prog in touch
11088do
11089  # Extract the first word of "$ac_prog", so it can be a program name with args.
11090set dummy $ac_prog; ac_word=$2
11091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11092$as_echo_n "checking for $ac_word... " >&6; }
11093if ${ac_cv_path_TOUCH+:} false; then :
11094  $as_echo_n "(cached) " >&6
11095else
11096  case $TOUCH in
11097  [\\/]* | ?:[\\/]*)
11098  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11099  ;;
11100  *)
11101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11102for as_dir in $PATH
11103do
11104  IFS=$as_save_IFS
11105  test -z "$as_dir" && as_dir=.
11106    for ac_exec_ext in '' $ac_executable_extensions; do
11107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11108    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11110    break 2
11111  fi
11112done
11113  done
11114IFS=$as_save_IFS
11115
11116  ;;
11117esac
11118fi
11119TOUCH=$ac_cv_path_TOUCH
11120if test -n "$TOUCH"; then
11121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11122$as_echo "$TOUCH" >&6; }
11123else
11124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11125$as_echo "no" >&6; }
11126fi
11127
11128
11129  test -n "$TOUCH" && break
11130done
11131
11132    else
11133      # If it succeeded, then it was overridden by the user. We will use it
11134      # for the tool.
11135
11136      # First remove it from the list of overridden variables, so we can test
11137      # for unknown variables in the end.
11138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11139
11140      # Check if we try to supply an empty value
11141      if test "x$TOUCH" = x; then
11142        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11143$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11145$as_echo_n "checking for TOUCH... " >&6; }
11146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11147$as_echo "disabled" >&6; }
11148      else
11149        # Check if the provided tool contains a complete path.
11150        tool_specified="$TOUCH"
11151        tool_basename="${tool_specified##*/}"
11152        if test "x$tool_basename" = "x$tool_specified"; then
11153          # A command without a complete path is provided, search $PATH.
11154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11155$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11156          # Extract the first word of "$tool_basename", so it can be a program name with args.
11157set dummy $tool_basename; ac_word=$2
11158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11159$as_echo_n "checking for $ac_word... " >&6; }
11160if ${ac_cv_path_TOUCH+:} false; then :
11161  $as_echo_n "(cached) " >&6
11162else
11163  case $TOUCH in
11164  [\\/]* | ?:[\\/]*)
11165  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11166  ;;
11167  *)
11168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11169for as_dir in $PATH
11170do
11171  IFS=$as_save_IFS
11172  test -z "$as_dir" && as_dir=.
11173    for ac_exec_ext in '' $ac_executable_extensions; do
11174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11175    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11177    break 2
11178  fi
11179done
11180  done
11181IFS=$as_save_IFS
11182
11183  ;;
11184esac
11185fi
11186TOUCH=$ac_cv_path_TOUCH
11187if test -n "$TOUCH"; then
11188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11189$as_echo "$TOUCH" >&6; }
11190else
11191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11192$as_echo "no" >&6; }
11193fi
11194
11195
11196          if test "x$TOUCH" = x; then
11197            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11198          fi
11199        else
11200          # Otherwise we believe it is a complete path. Use it as it is.
11201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11202$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11203          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11204$as_echo_n "checking for TOUCH... " >&6; }
11205          if test ! -x "$tool_specified"; then
11206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11207$as_echo "not found" >&6; }
11208            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11209          fi
11210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11211$as_echo "$tool_specified" >&6; }
11212        fi
11213      fi
11214    fi
11215
11216  fi
11217
11218
11219
11220  if test "x$TOUCH" = x; then
11221    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11222  fi
11223
11224
11225
11226
11227
11228  # Publish this variable in the help.
11229
11230
11231  if [ -z "${TR+x}" ]; then
11232    # The variable is not set by user, try to locate tool using the code snippet
11233    for ac_prog in tr
11234do
11235  # Extract the first word of "$ac_prog", so it can be a program name with args.
11236set dummy $ac_prog; ac_word=$2
11237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11238$as_echo_n "checking for $ac_word... " >&6; }
11239if ${ac_cv_path_TR+:} false; then :
11240  $as_echo_n "(cached) " >&6
11241else
11242  case $TR in
11243  [\\/]* | ?:[\\/]*)
11244  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11245  ;;
11246  *)
11247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11248for as_dir in $PATH
11249do
11250  IFS=$as_save_IFS
11251  test -z "$as_dir" && as_dir=.
11252    for ac_exec_ext in '' $ac_executable_extensions; do
11253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11254    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11256    break 2
11257  fi
11258done
11259  done
11260IFS=$as_save_IFS
11261
11262  ;;
11263esac
11264fi
11265TR=$ac_cv_path_TR
11266if test -n "$TR"; then
11267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11268$as_echo "$TR" >&6; }
11269else
11270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11271$as_echo "no" >&6; }
11272fi
11273
11274
11275  test -n "$TR" && break
11276done
11277
11278  else
11279    # The variable is set, but is it from the command line or the environment?
11280
11281    # Try to remove the string !TR! from our list.
11282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11284      # If it failed, the variable was not from the command line. Ignore it,
11285      # but warn the user (except for BASH, which is always set by the calling BASH).
11286      if test "xTR" != xBASH; then
11287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11288$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11289      fi
11290      # Try to locate tool using the code snippet
11291      for ac_prog in tr
11292do
11293  # Extract the first word of "$ac_prog", so it can be a program name with args.
11294set dummy $ac_prog; ac_word=$2
11295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11296$as_echo_n "checking for $ac_word... " >&6; }
11297if ${ac_cv_path_TR+:} false; then :
11298  $as_echo_n "(cached) " >&6
11299else
11300  case $TR in
11301  [\\/]* | ?:[\\/]*)
11302  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11303  ;;
11304  *)
11305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11306for as_dir in $PATH
11307do
11308  IFS=$as_save_IFS
11309  test -z "$as_dir" && as_dir=.
11310    for ac_exec_ext in '' $ac_executable_extensions; do
11311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11312    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11314    break 2
11315  fi
11316done
11317  done
11318IFS=$as_save_IFS
11319
11320  ;;
11321esac
11322fi
11323TR=$ac_cv_path_TR
11324if test -n "$TR"; then
11325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11326$as_echo "$TR" >&6; }
11327else
11328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329$as_echo "no" >&6; }
11330fi
11331
11332
11333  test -n "$TR" && break
11334done
11335
11336    else
11337      # If it succeeded, then it was overridden by the user. We will use it
11338      # for the tool.
11339
11340      # First remove it from the list of overridden variables, so we can test
11341      # for unknown variables in the end.
11342      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11343
11344      # Check if we try to supply an empty value
11345      if test "x$TR" = x; then
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11347$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11349$as_echo_n "checking for TR... " >&6; }
11350        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11351$as_echo "disabled" >&6; }
11352      else
11353        # Check if the provided tool contains a complete path.
11354        tool_specified="$TR"
11355        tool_basename="${tool_specified##*/}"
11356        if test "x$tool_basename" = "x$tool_specified"; then
11357          # A command without a complete path is provided, search $PATH.
11358          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11359$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11360          # Extract the first word of "$tool_basename", so it can be a program name with args.
11361set dummy $tool_basename; ac_word=$2
11362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11363$as_echo_n "checking for $ac_word... " >&6; }
11364if ${ac_cv_path_TR+:} false; then :
11365  $as_echo_n "(cached) " >&6
11366else
11367  case $TR in
11368  [\\/]* | ?:[\\/]*)
11369  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11370  ;;
11371  *)
11372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11373for as_dir in $PATH
11374do
11375  IFS=$as_save_IFS
11376  test -z "$as_dir" && as_dir=.
11377    for ac_exec_ext in '' $ac_executable_extensions; do
11378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11379    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11381    break 2
11382  fi
11383done
11384  done
11385IFS=$as_save_IFS
11386
11387  ;;
11388esac
11389fi
11390TR=$ac_cv_path_TR
11391if test -n "$TR"; then
11392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11393$as_echo "$TR" >&6; }
11394else
11395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11396$as_echo "no" >&6; }
11397fi
11398
11399
11400          if test "x$TR" = x; then
11401            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11402          fi
11403        else
11404          # Otherwise we believe it is a complete path. Use it as it is.
11405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11406$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11407          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11408$as_echo_n "checking for TR... " >&6; }
11409          if test ! -x "$tool_specified"; then
11410            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11411$as_echo "not found" >&6; }
11412            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11413          fi
11414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11415$as_echo "$tool_specified" >&6; }
11416        fi
11417      fi
11418    fi
11419
11420  fi
11421
11422
11423
11424  if test "x$TR" = x; then
11425    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11426  fi
11427
11428
11429
11430
11431
11432  # Publish this variable in the help.
11433
11434
11435  if [ -z "${UNAME+x}" ]; then
11436    # The variable is not set by user, try to locate tool using the code snippet
11437    for ac_prog in uname
11438do
11439  # Extract the first word of "$ac_prog", so it can be a program name with args.
11440set dummy $ac_prog; ac_word=$2
11441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11442$as_echo_n "checking for $ac_word... " >&6; }
11443if ${ac_cv_path_UNAME+:} false; then :
11444  $as_echo_n "(cached) " >&6
11445else
11446  case $UNAME in
11447  [\\/]* | ?:[\\/]*)
11448  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11449  ;;
11450  *)
11451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11452for as_dir in $PATH
11453do
11454  IFS=$as_save_IFS
11455  test -z "$as_dir" && as_dir=.
11456    for ac_exec_ext in '' $ac_executable_extensions; do
11457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11458    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11460    break 2
11461  fi
11462done
11463  done
11464IFS=$as_save_IFS
11465
11466  ;;
11467esac
11468fi
11469UNAME=$ac_cv_path_UNAME
11470if test -n "$UNAME"; then
11471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11472$as_echo "$UNAME" >&6; }
11473else
11474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11475$as_echo "no" >&6; }
11476fi
11477
11478
11479  test -n "$UNAME" && break
11480done
11481
11482  else
11483    # The variable is set, but is it from the command line or the environment?
11484
11485    # Try to remove the string !UNAME! from our list.
11486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11488      # If it failed, the variable was not from the command line. Ignore it,
11489      # but warn the user (except for BASH, which is always set by the calling BASH).
11490      if test "xUNAME" != xBASH; then
11491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11492$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11493      fi
11494      # Try to locate tool using the code snippet
11495      for ac_prog in uname
11496do
11497  # Extract the first word of "$ac_prog", so it can be a program name with args.
11498set dummy $ac_prog; ac_word=$2
11499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11500$as_echo_n "checking for $ac_word... " >&6; }
11501if ${ac_cv_path_UNAME+:} false; then :
11502  $as_echo_n "(cached) " >&6
11503else
11504  case $UNAME in
11505  [\\/]* | ?:[\\/]*)
11506  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11507  ;;
11508  *)
11509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11510for as_dir in $PATH
11511do
11512  IFS=$as_save_IFS
11513  test -z "$as_dir" && as_dir=.
11514    for ac_exec_ext in '' $ac_executable_extensions; do
11515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11516    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11518    break 2
11519  fi
11520done
11521  done
11522IFS=$as_save_IFS
11523
11524  ;;
11525esac
11526fi
11527UNAME=$ac_cv_path_UNAME
11528if test -n "$UNAME"; then
11529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11530$as_echo "$UNAME" >&6; }
11531else
11532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11533$as_echo "no" >&6; }
11534fi
11535
11536
11537  test -n "$UNAME" && break
11538done
11539
11540    else
11541      # If it succeeded, then it was overridden by the user. We will use it
11542      # for the tool.
11543
11544      # First remove it from the list of overridden variables, so we can test
11545      # for unknown variables in the end.
11546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11547
11548      # Check if we try to supply an empty value
11549      if test "x$UNAME" = x; then
11550        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11551$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11552        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11553$as_echo_n "checking for UNAME... " >&6; }
11554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11555$as_echo "disabled" >&6; }
11556      else
11557        # Check if the provided tool contains a complete path.
11558        tool_specified="$UNAME"
11559        tool_basename="${tool_specified##*/}"
11560        if test "x$tool_basename" = "x$tool_specified"; then
11561          # A command without a complete path is provided, search $PATH.
11562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11563$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11564          # Extract the first word of "$tool_basename", so it can be a program name with args.
11565set dummy $tool_basename; ac_word=$2
11566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11567$as_echo_n "checking for $ac_word... " >&6; }
11568if ${ac_cv_path_UNAME+:} false; then :
11569  $as_echo_n "(cached) " >&6
11570else
11571  case $UNAME in
11572  [\\/]* | ?:[\\/]*)
11573  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11574  ;;
11575  *)
11576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11577for as_dir in $PATH
11578do
11579  IFS=$as_save_IFS
11580  test -z "$as_dir" && as_dir=.
11581    for ac_exec_ext in '' $ac_executable_extensions; do
11582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11583    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11585    break 2
11586  fi
11587done
11588  done
11589IFS=$as_save_IFS
11590
11591  ;;
11592esac
11593fi
11594UNAME=$ac_cv_path_UNAME
11595if test -n "$UNAME"; then
11596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11597$as_echo "$UNAME" >&6; }
11598else
11599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
11601fi
11602
11603
11604          if test "x$UNAME" = x; then
11605            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11606          fi
11607        else
11608          # Otherwise we believe it is a complete path. Use it as it is.
11609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11610$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11612$as_echo_n "checking for UNAME... " >&6; }
11613          if test ! -x "$tool_specified"; then
11614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11615$as_echo "not found" >&6; }
11616            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11617          fi
11618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11619$as_echo "$tool_specified" >&6; }
11620        fi
11621      fi
11622    fi
11623
11624  fi
11625
11626
11627
11628  if test "x$UNAME" = x; then
11629    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11630  fi
11631
11632
11633
11634
11635
11636  # Publish this variable in the help.
11637
11638
11639  if [ -z "${UNIQ+x}" ]; then
11640    # The variable is not set by user, try to locate tool using the code snippet
11641    for ac_prog in uniq
11642do
11643  # Extract the first word of "$ac_prog", so it can be a program name with args.
11644set dummy $ac_prog; ac_word=$2
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11646$as_echo_n "checking for $ac_word... " >&6; }
11647if ${ac_cv_path_UNIQ+:} false; then :
11648  $as_echo_n "(cached) " >&6
11649else
11650  case $UNIQ in
11651  [\\/]* | ?:[\\/]*)
11652  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11653  ;;
11654  *)
11655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11656for as_dir in $PATH
11657do
11658  IFS=$as_save_IFS
11659  test -z "$as_dir" && as_dir=.
11660    for ac_exec_ext in '' $ac_executable_extensions; do
11661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11662    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11664    break 2
11665  fi
11666done
11667  done
11668IFS=$as_save_IFS
11669
11670  ;;
11671esac
11672fi
11673UNIQ=$ac_cv_path_UNIQ
11674if test -n "$UNIQ"; then
11675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11676$as_echo "$UNIQ" >&6; }
11677else
11678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679$as_echo "no" >&6; }
11680fi
11681
11682
11683  test -n "$UNIQ" && break
11684done
11685
11686  else
11687    # The variable is set, but is it from the command line or the environment?
11688
11689    # Try to remove the string !UNIQ! from our list.
11690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11692      # If it failed, the variable was not from the command line. Ignore it,
11693      # but warn the user (except for BASH, which is always set by the calling BASH).
11694      if test "xUNIQ" != xBASH; then
11695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11696$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11697      fi
11698      # Try to locate tool using the code snippet
11699      for ac_prog in uniq
11700do
11701  # Extract the first word of "$ac_prog", so it can be a program name with args.
11702set dummy $ac_prog; ac_word=$2
11703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11704$as_echo_n "checking for $ac_word... " >&6; }
11705if ${ac_cv_path_UNIQ+:} false; then :
11706  $as_echo_n "(cached) " >&6
11707else
11708  case $UNIQ in
11709  [\\/]* | ?:[\\/]*)
11710  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11711  ;;
11712  *)
11713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11714for as_dir in $PATH
11715do
11716  IFS=$as_save_IFS
11717  test -z "$as_dir" && as_dir=.
11718    for ac_exec_ext in '' $ac_executable_extensions; do
11719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11720    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11722    break 2
11723  fi
11724done
11725  done
11726IFS=$as_save_IFS
11727
11728  ;;
11729esac
11730fi
11731UNIQ=$ac_cv_path_UNIQ
11732if test -n "$UNIQ"; then
11733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11734$as_echo "$UNIQ" >&6; }
11735else
11736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11737$as_echo "no" >&6; }
11738fi
11739
11740
11741  test -n "$UNIQ" && break
11742done
11743
11744    else
11745      # If it succeeded, then it was overridden by the user. We will use it
11746      # for the tool.
11747
11748      # First remove it from the list of overridden variables, so we can test
11749      # for unknown variables in the end.
11750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11751
11752      # Check if we try to supply an empty value
11753      if test "x$UNIQ" = x; then
11754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11755$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11757$as_echo_n "checking for UNIQ... " >&6; }
11758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11759$as_echo "disabled" >&6; }
11760      else
11761        # Check if the provided tool contains a complete path.
11762        tool_specified="$UNIQ"
11763        tool_basename="${tool_specified##*/}"
11764        if test "x$tool_basename" = "x$tool_specified"; then
11765          # A command without a complete path is provided, search $PATH.
11766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11767$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11768          # Extract the first word of "$tool_basename", so it can be a program name with args.
11769set dummy $tool_basename; ac_word=$2
11770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11771$as_echo_n "checking for $ac_word... " >&6; }
11772if ${ac_cv_path_UNIQ+:} false; then :
11773  $as_echo_n "(cached) " >&6
11774else
11775  case $UNIQ in
11776  [\\/]* | ?:[\\/]*)
11777  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11778  ;;
11779  *)
11780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11781for as_dir in $PATH
11782do
11783  IFS=$as_save_IFS
11784  test -z "$as_dir" && as_dir=.
11785    for ac_exec_ext in '' $ac_executable_extensions; do
11786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11787    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11789    break 2
11790  fi
11791done
11792  done
11793IFS=$as_save_IFS
11794
11795  ;;
11796esac
11797fi
11798UNIQ=$ac_cv_path_UNIQ
11799if test -n "$UNIQ"; then
11800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11801$as_echo "$UNIQ" >&6; }
11802else
11803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804$as_echo "no" >&6; }
11805fi
11806
11807
11808          if test "x$UNIQ" = x; then
11809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11810          fi
11811        else
11812          # Otherwise we believe it is a complete path. Use it as it is.
11813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11814$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11816$as_echo_n "checking for UNIQ... " >&6; }
11817          if test ! -x "$tool_specified"; then
11818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11819$as_echo "not found" >&6; }
11820            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11821          fi
11822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11823$as_echo "$tool_specified" >&6; }
11824        fi
11825      fi
11826    fi
11827
11828  fi
11829
11830
11831
11832  if test "x$UNIQ" = x; then
11833    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11834  fi
11835
11836
11837
11838
11839
11840  # Publish this variable in the help.
11841
11842
11843  if [ -z "${WC+x}" ]; then
11844    # The variable is not set by user, try to locate tool using the code snippet
11845    for ac_prog in wc
11846do
11847  # Extract the first word of "$ac_prog", so it can be a program name with args.
11848set dummy $ac_prog; ac_word=$2
11849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11850$as_echo_n "checking for $ac_word... " >&6; }
11851if ${ac_cv_path_WC+:} false; then :
11852  $as_echo_n "(cached) " >&6
11853else
11854  case $WC in
11855  [\\/]* | ?:[\\/]*)
11856  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11857  ;;
11858  *)
11859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11860for as_dir in $PATH
11861do
11862  IFS=$as_save_IFS
11863  test -z "$as_dir" && as_dir=.
11864    for ac_exec_ext in '' $ac_executable_extensions; do
11865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11866    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11868    break 2
11869  fi
11870done
11871  done
11872IFS=$as_save_IFS
11873
11874  ;;
11875esac
11876fi
11877WC=$ac_cv_path_WC
11878if test -n "$WC"; then
11879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11880$as_echo "$WC" >&6; }
11881else
11882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11883$as_echo "no" >&6; }
11884fi
11885
11886
11887  test -n "$WC" && break
11888done
11889
11890  else
11891    # The variable is set, but is it from the command line or the environment?
11892
11893    # Try to remove the string !WC! from our list.
11894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11896      # If it failed, the variable was not from the command line. Ignore it,
11897      # but warn the user (except for BASH, which is always set by the calling BASH).
11898      if test "xWC" != xBASH; then
11899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11900$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11901      fi
11902      # Try to locate tool using the code snippet
11903      for ac_prog in wc
11904do
11905  # Extract the first word of "$ac_prog", so it can be a program name with args.
11906set dummy $ac_prog; ac_word=$2
11907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11908$as_echo_n "checking for $ac_word... " >&6; }
11909if ${ac_cv_path_WC+:} false; then :
11910  $as_echo_n "(cached) " >&6
11911else
11912  case $WC in
11913  [\\/]* | ?:[\\/]*)
11914  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11915  ;;
11916  *)
11917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11918for as_dir in $PATH
11919do
11920  IFS=$as_save_IFS
11921  test -z "$as_dir" && as_dir=.
11922    for ac_exec_ext in '' $ac_executable_extensions; do
11923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11924    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11926    break 2
11927  fi
11928done
11929  done
11930IFS=$as_save_IFS
11931
11932  ;;
11933esac
11934fi
11935WC=$ac_cv_path_WC
11936if test -n "$WC"; then
11937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11938$as_echo "$WC" >&6; }
11939else
11940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11941$as_echo "no" >&6; }
11942fi
11943
11944
11945  test -n "$WC" && break
11946done
11947
11948    else
11949      # If it succeeded, then it was overridden by the user. We will use it
11950      # for the tool.
11951
11952      # First remove it from the list of overridden variables, so we can test
11953      # for unknown variables in the end.
11954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11955
11956      # Check if we try to supply an empty value
11957      if test "x$WC" = x; then
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11959$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11961$as_echo_n "checking for WC... " >&6; }
11962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11963$as_echo "disabled" >&6; }
11964      else
11965        # Check if the provided tool contains a complete path.
11966        tool_specified="$WC"
11967        tool_basename="${tool_specified##*/}"
11968        if test "x$tool_basename" = "x$tool_specified"; then
11969          # A command without a complete path is provided, search $PATH.
11970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11971$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11972          # Extract the first word of "$tool_basename", so it can be a program name with args.
11973set dummy $tool_basename; ac_word=$2
11974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11975$as_echo_n "checking for $ac_word... " >&6; }
11976if ${ac_cv_path_WC+:} false; then :
11977  $as_echo_n "(cached) " >&6
11978else
11979  case $WC in
11980  [\\/]* | ?:[\\/]*)
11981  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11982  ;;
11983  *)
11984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11985for as_dir in $PATH
11986do
11987  IFS=$as_save_IFS
11988  test -z "$as_dir" && as_dir=.
11989    for ac_exec_ext in '' $ac_executable_extensions; do
11990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11991    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11993    break 2
11994  fi
11995done
11996  done
11997IFS=$as_save_IFS
11998
11999  ;;
12000esac
12001fi
12002WC=$ac_cv_path_WC
12003if test -n "$WC"; then
12004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12005$as_echo "$WC" >&6; }
12006else
12007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12008$as_echo "no" >&6; }
12009fi
12010
12011
12012          if test "x$WC" = x; then
12013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12014          fi
12015        else
12016          # Otherwise we believe it is a complete path. Use it as it is.
12017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12018$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12020$as_echo_n "checking for WC... " >&6; }
12021          if test ! -x "$tool_specified"; then
12022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12023$as_echo "not found" >&6; }
12024            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12025          fi
12026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12027$as_echo "$tool_specified" >&6; }
12028        fi
12029      fi
12030    fi
12031
12032  fi
12033
12034
12035
12036  if test "x$WC" = x; then
12037    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12038  fi
12039
12040
12041
12042
12043
12044  # Publish this variable in the help.
12045
12046
12047  if [ -z "${WHICH+x}" ]; then
12048    # The variable is not set by user, try to locate tool using the code snippet
12049    for ac_prog in which
12050do
12051  # Extract the first word of "$ac_prog", so it can be a program name with args.
12052set dummy $ac_prog; ac_word=$2
12053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12054$as_echo_n "checking for $ac_word... " >&6; }
12055if ${ac_cv_path_WHICH+:} false; then :
12056  $as_echo_n "(cached) " >&6
12057else
12058  case $WHICH in
12059  [\\/]* | ?:[\\/]*)
12060  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12061  ;;
12062  *)
12063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12064for as_dir in $PATH
12065do
12066  IFS=$as_save_IFS
12067  test -z "$as_dir" && as_dir=.
12068    for ac_exec_ext in '' $ac_executable_extensions; do
12069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12070    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12072    break 2
12073  fi
12074done
12075  done
12076IFS=$as_save_IFS
12077
12078  ;;
12079esac
12080fi
12081WHICH=$ac_cv_path_WHICH
12082if test -n "$WHICH"; then
12083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12084$as_echo "$WHICH" >&6; }
12085else
12086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12087$as_echo "no" >&6; }
12088fi
12089
12090
12091  test -n "$WHICH" && break
12092done
12093
12094  else
12095    # The variable is set, but is it from the command line or the environment?
12096
12097    # Try to remove the string !WHICH! from our list.
12098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12100      # If it failed, the variable was not from the command line. Ignore it,
12101      # but warn the user (except for BASH, which is always set by the calling BASH).
12102      if test "xWHICH" != xBASH; then
12103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12104$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12105      fi
12106      # Try to locate tool using the code snippet
12107      for ac_prog in which
12108do
12109  # Extract the first word of "$ac_prog", so it can be a program name with args.
12110set dummy $ac_prog; ac_word=$2
12111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12112$as_echo_n "checking for $ac_word... " >&6; }
12113if ${ac_cv_path_WHICH+:} false; then :
12114  $as_echo_n "(cached) " >&6
12115else
12116  case $WHICH in
12117  [\\/]* | ?:[\\/]*)
12118  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12119  ;;
12120  *)
12121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12122for as_dir in $PATH
12123do
12124  IFS=$as_save_IFS
12125  test -z "$as_dir" && as_dir=.
12126    for ac_exec_ext in '' $ac_executable_extensions; do
12127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12128    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12130    break 2
12131  fi
12132done
12133  done
12134IFS=$as_save_IFS
12135
12136  ;;
12137esac
12138fi
12139WHICH=$ac_cv_path_WHICH
12140if test -n "$WHICH"; then
12141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12142$as_echo "$WHICH" >&6; }
12143else
12144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12145$as_echo "no" >&6; }
12146fi
12147
12148
12149  test -n "$WHICH" && break
12150done
12151
12152    else
12153      # If it succeeded, then it was overridden by the user. We will use it
12154      # for the tool.
12155
12156      # First remove it from the list of overridden variables, so we can test
12157      # for unknown variables in the end.
12158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12159
12160      # Check if we try to supply an empty value
12161      if test "x$WHICH" = x; then
12162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12163$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12165$as_echo_n "checking for WHICH... " >&6; }
12166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12167$as_echo "disabled" >&6; }
12168      else
12169        # Check if the provided tool contains a complete path.
12170        tool_specified="$WHICH"
12171        tool_basename="${tool_specified##*/}"
12172        if test "x$tool_basename" = "x$tool_specified"; then
12173          # A command without a complete path is provided, search $PATH.
12174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12175$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12176          # Extract the first word of "$tool_basename", so it can be a program name with args.
12177set dummy $tool_basename; ac_word=$2
12178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12179$as_echo_n "checking for $ac_word... " >&6; }
12180if ${ac_cv_path_WHICH+:} false; then :
12181  $as_echo_n "(cached) " >&6
12182else
12183  case $WHICH in
12184  [\\/]* | ?:[\\/]*)
12185  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12186  ;;
12187  *)
12188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12189for as_dir in $PATH
12190do
12191  IFS=$as_save_IFS
12192  test -z "$as_dir" && as_dir=.
12193    for ac_exec_ext in '' $ac_executable_extensions; do
12194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12195    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12197    break 2
12198  fi
12199done
12200  done
12201IFS=$as_save_IFS
12202
12203  ;;
12204esac
12205fi
12206WHICH=$ac_cv_path_WHICH
12207if test -n "$WHICH"; then
12208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12209$as_echo "$WHICH" >&6; }
12210else
12211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12212$as_echo "no" >&6; }
12213fi
12214
12215
12216          if test "x$WHICH" = x; then
12217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12218          fi
12219        else
12220          # Otherwise we believe it is a complete path. Use it as it is.
12221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12222$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12224$as_echo_n "checking for WHICH... " >&6; }
12225          if test ! -x "$tool_specified"; then
12226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12227$as_echo "not found" >&6; }
12228            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12229          fi
12230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12231$as_echo "$tool_specified" >&6; }
12232        fi
12233      fi
12234    fi
12235
12236  fi
12237
12238
12239
12240  if test "x$WHICH" = x; then
12241    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12242  fi
12243
12244
12245
12246
12247
12248  # Publish this variable in the help.
12249
12250
12251  if [ -z "${XARGS+x}" ]; then
12252    # The variable is not set by user, try to locate tool using the code snippet
12253    for ac_prog in xargs
12254do
12255  # Extract the first word of "$ac_prog", so it can be a program name with args.
12256set dummy $ac_prog; ac_word=$2
12257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12258$as_echo_n "checking for $ac_word... " >&6; }
12259if ${ac_cv_path_XARGS+:} false; then :
12260  $as_echo_n "(cached) " >&6
12261else
12262  case $XARGS in
12263  [\\/]* | ?:[\\/]*)
12264  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12265  ;;
12266  *)
12267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12268for as_dir in $PATH
12269do
12270  IFS=$as_save_IFS
12271  test -z "$as_dir" && as_dir=.
12272    for ac_exec_ext in '' $ac_executable_extensions; do
12273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12274    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12276    break 2
12277  fi
12278done
12279  done
12280IFS=$as_save_IFS
12281
12282  ;;
12283esac
12284fi
12285XARGS=$ac_cv_path_XARGS
12286if test -n "$XARGS"; then
12287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12288$as_echo "$XARGS" >&6; }
12289else
12290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12291$as_echo "no" >&6; }
12292fi
12293
12294
12295  test -n "$XARGS" && break
12296done
12297
12298  else
12299    # The variable is set, but is it from the command line or the environment?
12300
12301    # Try to remove the string !XARGS! from our list.
12302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12304      # If it failed, the variable was not from the command line. Ignore it,
12305      # but warn the user (except for BASH, which is always set by the calling BASH).
12306      if test "xXARGS" != xBASH; then
12307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12308$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12309      fi
12310      # Try to locate tool using the code snippet
12311      for ac_prog in xargs
12312do
12313  # Extract the first word of "$ac_prog", so it can be a program name with args.
12314set dummy $ac_prog; ac_word=$2
12315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12316$as_echo_n "checking for $ac_word... " >&6; }
12317if ${ac_cv_path_XARGS+:} false; then :
12318  $as_echo_n "(cached) " >&6
12319else
12320  case $XARGS in
12321  [\\/]* | ?:[\\/]*)
12322  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12323  ;;
12324  *)
12325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12326for as_dir in $PATH
12327do
12328  IFS=$as_save_IFS
12329  test -z "$as_dir" && as_dir=.
12330    for ac_exec_ext in '' $ac_executable_extensions; do
12331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12332    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12334    break 2
12335  fi
12336done
12337  done
12338IFS=$as_save_IFS
12339
12340  ;;
12341esac
12342fi
12343XARGS=$ac_cv_path_XARGS
12344if test -n "$XARGS"; then
12345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12346$as_echo "$XARGS" >&6; }
12347else
12348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12349$as_echo "no" >&6; }
12350fi
12351
12352
12353  test -n "$XARGS" && break
12354done
12355
12356    else
12357      # If it succeeded, then it was overridden by the user. We will use it
12358      # for the tool.
12359
12360      # First remove it from the list of overridden variables, so we can test
12361      # for unknown variables in the end.
12362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12363
12364      # Check if we try to supply an empty value
12365      if test "x$XARGS" = x; then
12366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12367$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12369$as_echo_n "checking for XARGS... " >&6; }
12370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12371$as_echo "disabled" >&6; }
12372      else
12373        # Check if the provided tool contains a complete path.
12374        tool_specified="$XARGS"
12375        tool_basename="${tool_specified##*/}"
12376        if test "x$tool_basename" = "x$tool_specified"; then
12377          # A command without a complete path is provided, search $PATH.
12378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12379$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12380          # Extract the first word of "$tool_basename", so it can be a program name with args.
12381set dummy $tool_basename; ac_word=$2
12382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12383$as_echo_n "checking for $ac_word... " >&6; }
12384if ${ac_cv_path_XARGS+:} false; then :
12385  $as_echo_n "(cached) " >&6
12386else
12387  case $XARGS in
12388  [\\/]* | ?:[\\/]*)
12389  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12390  ;;
12391  *)
12392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12393for as_dir in $PATH
12394do
12395  IFS=$as_save_IFS
12396  test -z "$as_dir" && as_dir=.
12397    for ac_exec_ext in '' $ac_executable_extensions; do
12398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12399    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12401    break 2
12402  fi
12403done
12404  done
12405IFS=$as_save_IFS
12406
12407  ;;
12408esac
12409fi
12410XARGS=$ac_cv_path_XARGS
12411if test -n "$XARGS"; then
12412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12413$as_echo "$XARGS" >&6; }
12414else
12415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12416$as_echo "no" >&6; }
12417fi
12418
12419
12420          if test "x$XARGS" = x; then
12421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12422          fi
12423        else
12424          # Otherwise we believe it is a complete path. Use it as it is.
12425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12426$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12428$as_echo_n "checking for XARGS... " >&6; }
12429          if test ! -x "$tool_specified"; then
12430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12431$as_echo "not found" >&6; }
12432            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12433          fi
12434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12435$as_echo "$tool_specified" >&6; }
12436        fi
12437      fi
12438    fi
12439
12440  fi
12441
12442
12443
12444  if test "x$XARGS" = x; then
12445    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12446  fi
12447
12448
12449
12450  # Then required tools that require some special treatment.
12451
12452
12453  # Publish this variable in the help.
12454
12455
12456  if [ -z "${AWK+x}" ]; then
12457    # The variable is not set by user, try to locate tool using the code snippet
12458    for ac_prog in gawk mawk nawk awk
12459do
12460  # Extract the first word of "$ac_prog", so it can be a program name with args.
12461set dummy $ac_prog; ac_word=$2
12462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12463$as_echo_n "checking for $ac_word... " >&6; }
12464if ${ac_cv_prog_AWK+:} false; then :
12465  $as_echo_n "(cached) " >&6
12466else
12467  if test -n "$AWK"; then
12468  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12469else
12470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12471for as_dir in $PATH
12472do
12473  IFS=$as_save_IFS
12474  test -z "$as_dir" && as_dir=.
12475    for ac_exec_ext in '' $ac_executable_extensions; do
12476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12477    ac_cv_prog_AWK="$ac_prog"
12478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12479    break 2
12480  fi
12481done
12482  done
12483IFS=$as_save_IFS
12484
12485fi
12486fi
12487AWK=$ac_cv_prog_AWK
12488if test -n "$AWK"; then
12489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12490$as_echo "$AWK" >&6; }
12491else
12492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12493$as_echo "no" >&6; }
12494fi
12495
12496
12497  test -n "$AWK" && break
12498done
12499
12500  else
12501    # The variable is set, but is it from the command line or the environment?
12502
12503    # Try to remove the string !AWK! from our list.
12504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12506      # If it failed, the variable was not from the command line. Ignore it,
12507      # but warn the user (except for BASH, which is always set by the calling BASH).
12508      if test "xAWK" != xBASH; then
12509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12510$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12511      fi
12512      # Try to locate tool using the code snippet
12513      for ac_prog in gawk mawk nawk awk
12514do
12515  # Extract the first word of "$ac_prog", so it can be a program name with args.
12516set dummy $ac_prog; ac_word=$2
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12518$as_echo_n "checking for $ac_word... " >&6; }
12519if ${ac_cv_prog_AWK+:} false; then :
12520  $as_echo_n "(cached) " >&6
12521else
12522  if test -n "$AWK"; then
12523  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12524else
12525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12526for as_dir in $PATH
12527do
12528  IFS=$as_save_IFS
12529  test -z "$as_dir" && as_dir=.
12530    for ac_exec_ext in '' $ac_executable_extensions; do
12531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12532    ac_cv_prog_AWK="$ac_prog"
12533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12534    break 2
12535  fi
12536done
12537  done
12538IFS=$as_save_IFS
12539
12540fi
12541fi
12542AWK=$ac_cv_prog_AWK
12543if test -n "$AWK"; then
12544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12545$as_echo "$AWK" >&6; }
12546else
12547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548$as_echo "no" >&6; }
12549fi
12550
12551
12552  test -n "$AWK" && break
12553done
12554
12555    else
12556      # If it succeeded, then it was overridden by the user. We will use it
12557      # for the tool.
12558
12559      # First remove it from the list of overridden variables, so we can test
12560      # for unknown variables in the end.
12561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12562
12563      # Check if we try to supply an empty value
12564      if test "x$AWK" = x; then
12565        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12566$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12568$as_echo_n "checking for AWK... " >&6; }
12569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12570$as_echo "disabled" >&6; }
12571      else
12572        # Check if the provided tool contains a complete path.
12573        tool_specified="$AWK"
12574        tool_basename="${tool_specified##*/}"
12575        if test "x$tool_basename" = "x$tool_specified"; then
12576          # A command without a complete path is provided, search $PATH.
12577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12578$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12579          # Extract the first word of "$tool_basename", so it can be a program name with args.
12580set dummy $tool_basename; 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_AWK+:} false; then :
12584  $as_echo_n "(cached) " >&6
12585else
12586  case $AWK in
12587  [\\/]* | ?:[\\/]*)
12588  ac_cv_path_AWK="$AWK" # 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_AWK="$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
12609AWK=$ac_cv_path_AWK
12610if test -n "$AWK"; then
12611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12612$as_echo "$AWK" >&6; }
12613else
12614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12615$as_echo "no" >&6; }
12616fi
12617
12618
12619          if test "x$AWK" = x; then
12620            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12621          fi
12622        else
12623          # Otherwise we believe it is a complete path. Use it as it is.
12624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12625$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12626          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12627$as_echo_n "checking for AWK... " >&6; }
12628          if test ! -x "$tool_specified"; then
12629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12630$as_echo "not found" >&6; }
12631            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12632          fi
12633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12634$as_echo "$tool_specified" >&6; }
12635        fi
12636      fi
12637    fi
12638
12639  fi
12640
12641
12642  if test "x$AWK" = x; then
12643    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12644  fi
12645
12646
12647
12648
12649  # Publish this variable in the help.
12650
12651
12652  if [ -z "${GREP+x}" ]; then
12653    # The variable is not set by user, try to locate tool using the code snippet
12654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12655$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12656if ${ac_cv_path_GREP+:} false; then :
12657  $as_echo_n "(cached) " >&6
12658else
12659  if test -z "$GREP"; then
12660  ac_path_GREP_found=false
12661  # Loop through the user's path and test for each of PROGNAME-LIST
12662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12663for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12664do
12665  IFS=$as_save_IFS
12666  test -z "$as_dir" && as_dir=.
12667    for ac_prog in grep ggrep; do
12668    for ac_exec_ext in '' $ac_executable_extensions; do
12669      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12670      as_fn_executable_p "$ac_path_GREP" || continue
12671# Check for GNU ac_path_GREP and select it if it is found.
12672  # Check for GNU $ac_path_GREP
12673case `"$ac_path_GREP" --version 2>&1` in
12674*GNU*)
12675  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12676*)
12677  ac_count=0
12678  $as_echo_n 0123456789 >"conftest.in"
12679  while :
12680  do
12681    cat "conftest.in" "conftest.in" >"conftest.tmp"
12682    mv "conftest.tmp" "conftest.in"
12683    cp "conftest.in" "conftest.nl"
12684    $as_echo 'GREP' >> "conftest.nl"
12685    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12686    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12687    as_fn_arith $ac_count + 1 && ac_count=$as_val
12688    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12689      # Best one so far, save it but keep looking for a better one
12690      ac_cv_path_GREP="$ac_path_GREP"
12691      ac_path_GREP_max=$ac_count
12692    fi
12693    # 10*(2^10) chars as input seems more than enough
12694    test $ac_count -gt 10 && break
12695  done
12696  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12697esac
12698
12699      $ac_path_GREP_found && break 3
12700    done
12701  done
12702  done
12703IFS=$as_save_IFS
12704  if test -z "$ac_cv_path_GREP"; then
12705    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12706  fi
12707else
12708  ac_cv_path_GREP=$GREP
12709fi
12710
12711fi
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12713$as_echo "$ac_cv_path_GREP" >&6; }
12714 GREP="$ac_cv_path_GREP"
12715
12716
12717  else
12718    # The variable is set, but is it from the command line or the environment?
12719
12720    # Try to remove the string !GREP! from our list.
12721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12723      # If it failed, the variable was not from the command line. Ignore it,
12724      # but warn the user (except for BASH, which is always set by the calling BASH).
12725      if test "xGREP" != xBASH; then
12726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12727$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12728      fi
12729      # Try to locate tool using the code snippet
12730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12731$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12732if ${ac_cv_path_GREP+:} false; then :
12733  $as_echo_n "(cached) " >&6
12734else
12735  if test -z "$GREP"; then
12736  ac_path_GREP_found=false
12737  # Loop through the user's path and test for each of PROGNAME-LIST
12738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12739for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12740do
12741  IFS=$as_save_IFS
12742  test -z "$as_dir" && as_dir=.
12743    for ac_prog in grep ggrep; do
12744    for ac_exec_ext in '' $ac_executable_extensions; do
12745      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12746      as_fn_executable_p "$ac_path_GREP" || continue
12747# Check for GNU ac_path_GREP and select it if it is found.
12748  # Check for GNU $ac_path_GREP
12749case `"$ac_path_GREP" --version 2>&1` in
12750*GNU*)
12751  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12752*)
12753  ac_count=0
12754  $as_echo_n 0123456789 >"conftest.in"
12755  while :
12756  do
12757    cat "conftest.in" "conftest.in" >"conftest.tmp"
12758    mv "conftest.tmp" "conftest.in"
12759    cp "conftest.in" "conftest.nl"
12760    $as_echo 'GREP' >> "conftest.nl"
12761    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12762    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12763    as_fn_arith $ac_count + 1 && ac_count=$as_val
12764    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12765      # Best one so far, save it but keep looking for a better one
12766      ac_cv_path_GREP="$ac_path_GREP"
12767      ac_path_GREP_max=$ac_count
12768    fi
12769    # 10*(2^10) chars as input seems more than enough
12770    test $ac_count -gt 10 && break
12771  done
12772  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12773esac
12774
12775      $ac_path_GREP_found && break 3
12776    done
12777  done
12778  done
12779IFS=$as_save_IFS
12780  if test -z "$ac_cv_path_GREP"; then
12781    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12782  fi
12783else
12784  ac_cv_path_GREP=$GREP
12785fi
12786
12787fi
12788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12789$as_echo "$ac_cv_path_GREP" >&6; }
12790 GREP="$ac_cv_path_GREP"
12791
12792
12793    else
12794      # If it succeeded, then it was overridden by the user. We will use it
12795      # for the tool.
12796
12797      # First remove it from the list of overridden variables, so we can test
12798      # for unknown variables in the end.
12799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12800
12801      # Check if we try to supply an empty value
12802      if test "x$GREP" = x; then
12803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12804$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12806$as_echo_n "checking for GREP... " >&6; }
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12808$as_echo "disabled" >&6; }
12809      else
12810        # Check if the provided tool contains a complete path.
12811        tool_specified="$GREP"
12812        tool_basename="${tool_specified##*/}"
12813        if test "x$tool_basename" = "x$tool_specified"; then
12814          # A command without a complete path is provided, search $PATH.
12815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12816$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12817          # Extract the first word of "$tool_basename", so it can be a program name with args.
12818set dummy $tool_basename; ac_word=$2
12819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12820$as_echo_n "checking for $ac_word... " >&6; }
12821if ${ac_cv_path_GREP+:} false; then :
12822  $as_echo_n "(cached) " >&6
12823else
12824  case $GREP in
12825  [\\/]* | ?:[\\/]*)
12826  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12827  ;;
12828  *)
12829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12830for as_dir in $PATH
12831do
12832  IFS=$as_save_IFS
12833  test -z "$as_dir" && as_dir=.
12834    for ac_exec_ext in '' $ac_executable_extensions; do
12835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12836    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12838    break 2
12839  fi
12840done
12841  done
12842IFS=$as_save_IFS
12843
12844  ;;
12845esac
12846fi
12847GREP=$ac_cv_path_GREP
12848if test -n "$GREP"; then
12849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12850$as_echo "$GREP" >&6; }
12851else
12852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12853$as_echo "no" >&6; }
12854fi
12855
12856
12857          if test "x$GREP" = x; then
12858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12859          fi
12860        else
12861          # Otherwise we believe it is a complete path. Use it as it is.
12862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12863$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12865$as_echo_n "checking for GREP... " >&6; }
12866          if test ! -x "$tool_specified"; then
12867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12868$as_echo "not found" >&6; }
12869            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12870          fi
12871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12872$as_echo "$tool_specified" >&6; }
12873        fi
12874      fi
12875    fi
12876
12877  fi
12878
12879
12880  if test "x$GREP" = x; then
12881    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12882  fi
12883
12884
12885
12886
12887  # Publish this variable in the help.
12888
12889
12890  if [ -z "${EGREP+x}" ]; then
12891    # The variable is not set by user, try to locate tool using the code snippet
12892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12893$as_echo_n "checking for egrep... " >&6; }
12894if ${ac_cv_path_EGREP+:} false; then :
12895  $as_echo_n "(cached) " >&6
12896else
12897  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12898   then ac_cv_path_EGREP="$GREP -E"
12899   else
12900     if test -z "$EGREP"; then
12901  ac_path_EGREP_found=false
12902  # Loop through the user's path and test for each of PROGNAME-LIST
12903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12904for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12905do
12906  IFS=$as_save_IFS
12907  test -z "$as_dir" && as_dir=.
12908    for ac_prog in egrep; do
12909    for ac_exec_ext in '' $ac_executable_extensions; do
12910      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12911      as_fn_executable_p "$ac_path_EGREP" || continue
12912# Check for GNU ac_path_EGREP and select it if it is found.
12913  # Check for GNU $ac_path_EGREP
12914case `"$ac_path_EGREP" --version 2>&1` in
12915*GNU*)
12916  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12917*)
12918  ac_count=0
12919  $as_echo_n 0123456789 >"conftest.in"
12920  while :
12921  do
12922    cat "conftest.in" "conftest.in" >"conftest.tmp"
12923    mv "conftest.tmp" "conftest.in"
12924    cp "conftest.in" "conftest.nl"
12925    $as_echo 'EGREP' >> "conftest.nl"
12926    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12927    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12928    as_fn_arith $ac_count + 1 && ac_count=$as_val
12929    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12930      # Best one so far, save it but keep looking for a better one
12931      ac_cv_path_EGREP="$ac_path_EGREP"
12932      ac_path_EGREP_max=$ac_count
12933    fi
12934    # 10*(2^10) chars as input seems more than enough
12935    test $ac_count -gt 10 && break
12936  done
12937  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12938esac
12939
12940      $ac_path_EGREP_found && break 3
12941    done
12942  done
12943  done
12944IFS=$as_save_IFS
12945  if test -z "$ac_cv_path_EGREP"; then
12946    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12947  fi
12948else
12949  ac_cv_path_EGREP=$EGREP
12950fi
12951
12952   fi
12953fi
12954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12955$as_echo "$ac_cv_path_EGREP" >&6; }
12956 EGREP="$ac_cv_path_EGREP"
12957
12958
12959  else
12960    # The variable is set, but is it from the command line or the environment?
12961
12962    # Try to remove the string !EGREP! from our list.
12963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12965      # If it failed, the variable was not from the command line. Ignore it,
12966      # but warn the user (except for BASH, which is always set by the calling BASH).
12967      if test "xEGREP" != xBASH; then
12968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12969$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12970      fi
12971      # Try to locate tool using the code snippet
12972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12973$as_echo_n "checking for egrep... " >&6; }
12974if ${ac_cv_path_EGREP+:} false; then :
12975  $as_echo_n "(cached) " >&6
12976else
12977  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12978   then ac_cv_path_EGREP="$GREP -E"
12979   else
12980     if test -z "$EGREP"; then
12981  ac_path_EGREP_found=false
12982  # Loop through the user's path and test for each of PROGNAME-LIST
12983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12984for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12985do
12986  IFS=$as_save_IFS
12987  test -z "$as_dir" && as_dir=.
12988    for ac_prog in egrep; do
12989    for ac_exec_ext in '' $ac_executable_extensions; do
12990      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12991      as_fn_executable_p "$ac_path_EGREP" || continue
12992# Check for GNU ac_path_EGREP and select it if it is found.
12993  # Check for GNU $ac_path_EGREP
12994case `"$ac_path_EGREP" --version 2>&1` in
12995*GNU*)
12996  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12997*)
12998  ac_count=0
12999  $as_echo_n 0123456789 >"conftest.in"
13000  while :
13001  do
13002    cat "conftest.in" "conftest.in" >"conftest.tmp"
13003    mv "conftest.tmp" "conftest.in"
13004    cp "conftest.in" "conftest.nl"
13005    $as_echo 'EGREP' >> "conftest.nl"
13006    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13007    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13008    as_fn_arith $ac_count + 1 && ac_count=$as_val
13009    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13010      # Best one so far, save it but keep looking for a better one
13011      ac_cv_path_EGREP="$ac_path_EGREP"
13012      ac_path_EGREP_max=$ac_count
13013    fi
13014    # 10*(2^10) chars as input seems more than enough
13015    test $ac_count -gt 10 && break
13016  done
13017  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13018esac
13019
13020      $ac_path_EGREP_found && break 3
13021    done
13022  done
13023  done
13024IFS=$as_save_IFS
13025  if test -z "$ac_cv_path_EGREP"; then
13026    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13027  fi
13028else
13029  ac_cv_path_EGREP=$EGREP
13030fi
13031
13032   fi
13033fi
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13035$as_echo "$ac_cv_path_EGREP" >&6; }
13036 EGREP="$ac_cv_path_EGREP"
13037
13038
13039    else
13040      # If it succeeded, then it was overridden by the user. We will use it
13041      # for the tool.
13042
13043      # First remove it from the list of overridden variables, so we can test
13044      # for unknown variables in the end.
13045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13046
13047      # Check if we try to supply an empty value
13048      if test "x$EGREP" = x; then
13049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13050$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13052$as_echo_n "checking for EGREP... " >&6; }
13053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13054$as_echo "disabled" >&6; }
13055      else
13056        # Check if the provided tool contains a complete path.
13057        tool_specified="$EGREP"
13058        tool_basename="${tool_specified##*/}"
13059        if test "x$tool_basename" = "x$tool_specified"; then
13060          # A command without a complete path is provided, search $PATH.
13061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13062$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13063          # Extract the first word of "$tool_basename", so it can be a program name with args.
13064set dummy $tool_basename; ac_word=$2
13065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13066$as_echo_n "checking for $ac_word... " >&6; }
13067if ${ac_cv_path_EGREP+:} false; then :
13068  $as_echo_n "(cached) " >&6
13069else
13070  case $EGREP in
13071  [\\/]* | ?:[\\/]*)
13072  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13073  ;;
13074  *)
13075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13076for as_dir in $PATH
13077do
13078  IFS=$as_save_IFS
13079  test -z "$as_dir" && as_dir=.
13080    for ac_exec_ext in '' $ac_executable_extensions; do
13081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13082    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13084    break 2
13085  fi
13086done
13087  done
13088IFS=$as_save_IFS
13089
13090  ;;
13091esac
13092fi
13093EGREP=$ac_cv_path_EGREP
13094if test -n "$EGREP"; then
13095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13096$as_echo "$EGREP" >&6; }
13097else
13098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099$as_echo "no" >&6; }
13100fi
13101
13102
13103          if test "x$EGREP" = x; then
13104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13105          fi
13106        else
13107          # Otherwise we believe it is a complete path. Use it as it is.
13108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13109$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13111$as_echo_n "checking for EGREP... " >&6; }
13112          if test ! -x "$tool_specified"; then
13113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13114$as_echo "not found" >&6; }
13115            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13116          fi
13117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13118$as_echo "$tool_specified" >&6; }
13119        fi
13120      fi
13121    fi
13122
13123  fi
13124
13125
13126  if test "x$EGREP" = x; then
13127    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13128  fi
13129
13130
13131
13132
13133  # Publish this variable in the help.
13134
13135
13136  if [ -z "${FGREP+x}" ]; then
13137    # The variable is not set by user, try to locate tool using the code snippet
13138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13139$as_echo_n "checking for fgrep... " >&6; }
13140if ${ac_cv_path_FGREP+:} false; then :
13141  $as_echo_n "(cached) " >&6
13142else
13143  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13144   then ac_cv_path_FGREP="$GREP -F"
13145   else
13146     if test -z "$FGREP"; then
13147  ac_path_FGREP_found=false
13148  # Loop through the user's path and test for each of PROGNAME-LIST
13149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13150for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13151do
13152  IFS=$as_save_IFS
13153  test -z "$as_dir" && as_dir=.
13154    for ac_prog in fgrep; do
13155    for ac_exec_ext in '' $ac_executable_extensions; do
13156      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13157      as_fn_executable_p "$ac_path_FGREP" || continue
13158# Check for GNU ac_path_FGREP and select it if it is found.
13159  # Check for GNU $ac_path_FGREP
13160case `"$ac_path_FGREP" --version 2>&1` in
13161*GNU*)
13162  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13163*)
13164  ac_count=0
13165  $as_echo_n 0123456789 >"conftest.in"
13166  while :
13167  do
13168    cat "conftest.in" "conftest.in" >"conftest.tmp"
13169    mv "conftest.tmp" "conftest.in"
13170    cp "conftest.in" "conftest.nl"
13171    $as_echo 'FGREP' >> "conftest.nl"
13172    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13173    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13174    as_fn_arith $ac_count + 1 && ac_count=$as_val
13175    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13176      # Best one so far, save it but keep looking for a better one
13177      ac_cv_path_FGREP="$ac_path_FGREP"
13178      ac_path_FGREP_max=$ac_count
13179    fi
13180    # 10*(2^10) chars as input seems more than enough
13181    test $ac_count -gt 10 && break
13182  done
13183  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13184esac
13185
13186      $ac_path_FGREP_found && break 3
13187    done
13188  done
13189  done
13190IFS=$as_save_IFS
13191  if test -z "$ac_cv_path_FGREP"; then
13192    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13193  fi
13194else
13195  ac_cv_path_FGREP=$FGREP
13196fi
13197
13198   fi
13199fi
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13201$as_echo "$ac_cv_path_FGREP" >&6; }
13202 FGREP="$ac_cv_path_FGREP"
13203
13204
13205  else
13206    # The variable is set, but is it from the command line or the environment?
13207
13208    # Try to remove the string !FGREP! from our list.
13209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13211      # If it failed, the variable was not from the command line. Ignore it,
13212      # but warn the user (except for BASH, which is always set by the calling BASH).
13213      if test "xFGREP" != xBASH; then
13214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13215$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13216      fi
13217      # Try to locate tool using the code snippet
13218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13219$as_echo_n "checking for fgrep... " >&6; }
13220if ${ac_cv_path_FGREP+:} false; then :
13221  $as_echo_n "(cached) " >&6
13222else
13223  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13224   then ac_cv_path_FGREP="$GREP -F"
13225   else
13226     if test -z "$FGREP"; then
13227  ac_path_FGREP_found=false
13228  # Loop through the user's path and test for each of PROGNAME-LIST
13229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13230for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13231do
13232  IFS=$as_save_IFS
13233  test -z "$as_dir" && as_dir=.
13234    for ac_prog in fgrep; do
13235    for ac_exec_ext in '' $ac_executable_extensions; do
13236      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13237      as_fn_executable_p "$ac_path_FGREP" || continue
13238# Check for GNU ac_path_FGREP and select it if it is found.
13239  # Check for GNU $ac_path_FGREP
13240case `"$ac_path_FGREP" --version 2>&1` in
13241*GNU*)
13242  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13243*)
13244  ac_count=0
13245  $as_echo_n 0123456789 >"conftest.in"
13246  while :
13247  do
13248    cat "conftest.in" "conftest.in" >"conftest.tmp"
13249    mv "conftest.tmp" "conftest.in"
13250    cp "conftest.in" "conftest.nl"
13251    $as_echo 'FGREP' >> "conftest.nl"
13252    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13253    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13254    as_fn_arith $ac_count + 1 && ac_count=$as_val
13255    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13256      # Best one so far, save it but keep looking for a better one
13257      ac_cv_path_FGREP="$ac_path_FGREP"
13258      ac_path_FGREP_max=$ac_count
13259    fi
13260    # 10*(2^10) chars as input seems more than enough
13261    test $ac_count -gt 10 && break
13262  done
13263  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13264esac
13265
13266      $ac_path_FGREP_found && break 3
13267    done
13268  done
13269  done
13270IFS=$as_save_IFS
13271  if test -z "$ac_cv_path_FGREP"; then
13272    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13273  fi
13274else
13275  ac_cv_path_FGREP=$FGREP
13276fi
13277
13278   fi
13279fi
13280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13281$as_echo "$ac_cv_path_FGREP" >&6; }
13282 FGREP="$ac_cv_path_FGREP"
13283
13284
13285    else
13286      # If it succeeded, then it was overridden by the user. We will use it
13287      # for the tool.
13288
13289      # First remove it from the list of overridden variables, so we can test
13290      # for unknown variables in the end.
13291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13292
13293      # Check if we try to supply an empty value
13294      if test "x$FGREP" = x; then
13295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13296$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13298$as_echo_n "checking for FGREP... " >&6; }
13299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13300$as_echo "disabled" >&6; }
13301      else
13302        # Check if the provided tool contains a complete path.
13303        tool_specified="$FGREP"
13304        tool_basename="${tool_specified##*/}"
13305        if test "x$tool_basename" = "x$tool_specified"; then
13306          # A command without a complete path is provided, search $PATH.
13307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13308$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13309          # Extract the first word of "$tool_basename", so it can be a program name with args.
13310set dummy $tool_basename; ac_word=$2
13311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13312$as_echo_n "checking for $ac_word... " >&6; }
13313if ${ac_cv_path_FGREP+:} false; then :
13314  $as_echo_n "(cached) " >&6
13315else
13316  case $FGREP in
13317  [\\/]* | ?:[\\/]*)
13318  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13319  ;;
13320  *)
13321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13322for as_dir in $PATH
13323do
13324  IFS=$as_save_IFS
13325  test -z "$as_dir" && as_dir=.
13326    for ac_exec_ext in '' $ac_executable_extensions; do
13327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13328    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13330    break 2
13331  fi
13332done
13333  done
13334IFS=$as_save_IFS
13335
13336  ;;
13337esac
13338fi
13339FGREP=$ac_cv_path_FGREP
13340if test -n "$FGREP"; then
13341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13342$as_echo "$FGREP" >&6; }
13343else
13344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13345$as_echo "no" >&6; }
13346fi
13347
13348
13349          if test "x$FGREP" = x; then
13350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13351          fi
13352        else
13353          # Otherwise we believe it is a complete path. Use it as it is.
13354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13355$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13357$as_echo_n "checking for FGREP... " >&6; }
13358          if test ! -x "$tool_specified"; then
13359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13360$as_echo "not found" >&6; }
13361            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13362          fi
13363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13364$as_echo "$tool_specified" >&6; }
13365        fi
13366      fi
13367    fi
13368
13369  fi
13370
13371
13372  if test "x$FGREP" = x; then
13373    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13374  fi
13375
13376
13377
13378
13379  # Publish this variable in the help.
13380
13381
13382  if [ -z "${SED+x}" ]; then
13383    # The variable is not set by user, try to locate tool using the code snippet
13384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13385$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13386if ${ac_cv_path_SED+:} false; then :
13387  $as_echo_n "(cached) " >&6
13388else
13389            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13390     for ac_i in 1 2 3 4 5 6 7; do
13391       ac_script="$ac_script$as_nl$ac_script"
13392     done
13393     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13394     { ac_script=; unset ac_script;}
13395     if test -z "$SED"; then
13396  ac_path_SED_found=false
13397  # Loop through the user's path and test for each of PROGNAME-LIST
13398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13399for as_dir in $PATH
13400do
13401  IFS=$as_save_IFS
13402  test -z "$as_dir" && as_dir=.
13403    for ac_prog in sed gsed; do
13404    for ac_exec_ext in '' $ac_executable_extensions; do
13405      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13406      as_fn_executable_p "$ac_path_SED" || continue
13407# Check for GNU ac_path_SED and select it if it is found.
13408  # Check for GNU $ac_path_SED
13409case `"$ac_path_SED" --version 2>&1` in
13410*GNU*)
13411  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13412*)
13413  ac_count=0
13414  $as_echo_n 0123456789 >"conftest.in"
13415  while :
13416  do
13417    cat "conftest.in" "conftest.in" >"conftest.tmp"
13418    mv "conftest.tmp" "conftest.in"
13419    cp "conftest.in" "conftest.nl"
13420    $as_echo '' >> "conftest.nl"
13421    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13422    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13423    as_fn_arith $ac_count + 1 && ac_count=$as_val
13424    if test $ac_count -gt ${ac_path_SED_max-0}; then
13425      # Best one so far, save it but keep looking for a better one
13426      ac_cv_path_SED="$ac_path_SED"
13427      ac_path_SED_max=$ac_count
13428    fi
13429    # 10*(2^10) chars as input seems more than enough
13430    test $ac_count -gt 10 && break
13431  done
13432  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13433esac
13434
13435      $ac_path_SED_found && break 3
13436    done
13437  done
13438  done
13439IFS=$as_save_IFS
13440  if test -z "$ac_cv_path_SED"; then
13441    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13442  fi
13443else
13444  ac_cv_path_SED=$SED
13445fi
13446
13447fi
13448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13449$as_echo "$ac_cv_path_SED" >&6; }
13450 SED="$ac_cv_path_SED"
13451  rm -f conftest.sed
13452
13453  else
13454    # The variable is set, but is it from the command line or the environment?
13455
13456    # Try to remove the string !SED! from our list.
13457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13459      # If it failed, the variable was not from the command line. Ignore it,
13460      # but warn the user (except for BASH, which is always set by the calling BASH).
13461      if test "xSED" != xBASH; then
13462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13463$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13464      fi
13465      # Try to locate tool using the code snippet
13466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13467$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13468if ${ac_cv_path_SED+:} false; then :
13469  $as_echo_n "(cached) " >&6
13470else
13471            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13472     for ac_i in 1 2 3 4 5 6 7; do
13473       ac_script="$ac_script$as_nl$ac_script"
13474     done
13475     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13476     { ac_script=; unset ac_script;}
13477     if test -z "$SED"; then
13478  ac_path_SED_found=false
13479  # Loop through the user's path and test for each of PROGNAME-LIST
13480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13481for as_dir in $PATH
13482do
13483  IFS=$as_save_IFS
13484  test -z "$as_dir" && as_dir=.
13485    for ac_prog in sed gsed; do
13486    for ac_exec_ext in '' $ac_executable_extensions; do
13487      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13488      as_fn_executable_p "$ac_path_SED" || continue
13489# Check for GNU ac_path_SED and select it if it is found.
13490  # Check for GNU $ac_path_SED
13491case `"$ac_path_SED" --version 2>&1` in
13492*GNU*)
13493  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13494*)
13495  ac_count=0
13496  $as_echo_n 0123456789 >"conftest.in"
13497  while :
13498  do
13499    cat "conftest.in" "conftest.in" >"conftest.tmp"
13500    mv "conftest.tmp" "conftest.in"
13501    cp "conftest.in" "conftest.nl"
13502    $as_echo '' >> "conftest.nl"
13503    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13504    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13505    as_fn_arith $ac_count + 1 && ac_count=$as_val
13506    if test $ac_count -gt ${ac_path_SED_max-0}; then
13507      # Best one so far, save it but keep looking for a better one
13508      ac_cv_path_SED="$ac_path_SED"
13509      ac_path_SED_max=$ac_count
13510    fi
13511    # 10*(2^10) chars as input seems more than enough
13512    test $ac_count -gt 10 && break
13513  done
13514  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13515esac
13516
13517      $ac_path_SED_found && break 3
13518    done
13519  done
13520  done
13521IFS=$as_save_IFS
13522  if test -z "$ac_cv_path_SED"; then
13523    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13524  fi
13525else
13526  ac_cv_path_SED=$SED
13527fi
13528
13529fi
13530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13531$as_echo "$ac_cv_path_SED" >&6; }
13532 SED="$ac_cv_path_SED"
13533  rm -f conftest.sed
13534
13535    else
13536      # If it succeeded, then it was overridden by the user. We will use it
13537      # for the tool.
13538
13539      # First remove it from the list of overridden variables, so we can test
13540      # for unknown variables in the end.
13541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13542
13543      # Check if we try to supply an empty value
13544      if test "x$SED" = x; then
13545        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13546$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13548$as_echo_n "checking for SED... " >&6; }
13549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13550$as_echo "disabled" >&6; }
13551      else
13552        # Check if the provided tool contains a complete path.
13553        tool_specified="$SED"
13554        tool_basename="${tool_specified##*/}"
13555        if test "x$tool_basename" = "x$tool_specified"; then
13556          # A command without a complete path is provided, search $PATH.
13557          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13558$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13559          # Extract the first word of "$tool_basename", so it can be a program name with args.
13560set dummy $tool_basename; ac_word=$2
13561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13562$as_echo_n "checking for $ac_word... " >&6; }
13563if ${ac_cv_path_SED+:} false; then :
13564  $as_echo_n "(cached) " >&6
13565else
13566  case $SED in
13567  [\\/]* | ?:[\\/]*)
13568  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13569  ;;
13570  *)
13571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13572for as_dir in $PATH
13573do
13574  IFS=$as_save_IFS
13575  test -z "$as_dir" && as_dir=.
13576    for ac_exec_ext in '' $ac_executable_extensions; do
13577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13578    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13580    break 2
13581  fi
13582done
13583  done
13584IFS=$as_save_IFS
13585
13586  ;;
13587esac
13588fi
13589SED=$ac_cv_path_SED
13590if test -n "$SED"; then
13591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13592$as_echo "$SED" >&6; }
13593else
13594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13595$as_echo "no" >&6; }
13596fi
13597
13598
13599          if test "x$SED" = x; then
13600            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13601          fi
13602        else
13603          # Otherwise we believe it is a complete path. Use it as it is.
13604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13605$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13606          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13607$as_echo_n "checking for SED... " >&6; }
13608          if test ! -x "$tool_specified"; then
13609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13610$as_echo "not found" >&6; }
13611            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13612          fi
13613          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13614$as_echo "$tool_specified" >&6; }
13615        fi
13616      fi
13617    fi
13618
13619  fi
13620
13621
13622  if test "x$SED" = x; then
13623    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13624  fi
13625
13626
13627
13628  # Always force rm.
13629  RM="$RM -f"
13630
13631  # pwd behaves differently on various platforms and some don't support the -L flag.
13632  # Always use the bash builtin pwd to get uniform behavior.
13633  THEPWDCMD=pwd
13634
13635  # These are not required on all platforms
13636
13637
13638  # Publish this variable in the help.
13639
13640
13641  if [ -z "${CYGPATH+x}" ]; then
13642    # The variable is not set by user, try to locate tool using the code snippet
13643    for ac_prog in cygpath
13644do
13645  # Extract the first word of "$ac_prog", so it can be a program name with args.
13646set dummy $ac_prog; ac_word=$2
13647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13648$as_echo_n "checking for $ac_word... " >&6; }
13649if ${ac_cv_path_CYGPATH+:} false; then :
13650  $as_echo_n "(cached) " >&6
13651else
13652  case $CYGPATH in
13653  [\\/]* | ?:[\\/]*)
13654  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13655  ;;
13656  *)
13657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13658for as_dir in $PATH
13659do
13660  IFS=$as_save_IFS
13661  test -z "$as_dir" && as_dir=.
13662    for ac_exec_ext in '' $ac_executable_extensions; do
13663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13664    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13666    break 2
13667  fi
13668done
13669  done
13670IFS=$as_save_IFS
13671
13672  ;;
13673esac
13674fi
13675CYGPATH=$ac_cv_path_CYGPATH
13676if test -n "$CYGPATH"; then
13677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13678$as_echo "$CYGPATH" >&6; }
13679else
13680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13681$as_echo "no" >&6; }
13682fi
13683
13684
13685  test -n "$CYGPATH" && break
13686done
13687
13688  else
13689    # The variable is set, but is it from the command line or the environment?
13690
13691    # Try to remove the string !CYGPATH! from our list.
13692    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13693    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13694      # If it failed, the variable was not from the command line. Ignore it,
13695      # but warn the user (except for BASH, which is always set by the calling BASH).
13696      if test "xCYGPATH" != xBASH; then
13697        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13698$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13699      fi
13700      # Try to locate tool using the code snippet
13701      for ac_prog in cygpath
13702do
13703  # Extract the first word of "$ac_prog", so it can be a program name with args.
13704set dummy $ac_prog; ac_word=$2
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13706$as_echo_n "checking for $ac_word... " >&6; }
13707if ${ac_cv_path_CYGPATH+:} false; then :
13708  $as_echo_n "(cached) " >&6
13709else
13710  case $CYGPATH in
13711  [\\/]* | ?:[\\/]*)
13712  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13713  ;;
13714  *)
13715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13716for as_dir in $PATH
13717do
13718  IFS=$as_save_IFS
13719  test -z "$as_dir" && as_dir=.
13720    for ac_exec_ext in '' $ac_executable_extensions; do
13721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13722    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13724    break 2
13725  fi
13726done
13727  done
13728IFS=$as_save_IFS
13729
13730  ;;
13731esac
13732fi
13733CYGPATH=$ac_cv_path_CYGPATH
13734if test -n "$CYGPATH"; then
13735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13736$as_echo "$CYGPATH" >&6; }
13737else
13738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13739$as_echo "no" >&6; }
13740fi
13741
13742
13743  test -n "$CYGPATH" && break
13744done
13745
13746    else
13747      # If it succeeded, then it was overridden by the user. We will use it
13748      # for the tool.
13749
13750      # First remove it from the list of overridden variables, so we can test
13751      # for unknown variables in the end.
13752      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13753
13754      # Check if we try to supply an empty value
13755      if test "x$CYGPATH" = x; then
13756        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13757$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13758        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13759$as_echo_n "checking for CYGPATH... " >&6; }
13760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13761$as_echo "disabled" >&6; }
13762      else
13763        # Check if the provided tool contains a complete path.
13764        tool_specified="$CYGPATH"
13765        tool_basename="${tool_specified##*/}"
13766        if test "x$tool_basename" = "x$tool_specified"; then
13767          # A command without a complete path is provided, search $PATH.
13768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13769$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13770          # Extract the first word of "$tool_basename", so it can be a program name with args.
13771set dummy $tool_basename; ac_word=$2
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13773$as_echo_n "checking for $ac_word... " >&6; }
13774if ${ac_cv_path_CYGPATH+:} false; then :
13775  $as_echo_n "(cached) " >&6
13776else
13777  case $CYGPATH in
13778  [\\/]* | ?:[\\/]*)
13779  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13780  ;;
13781  *)
13782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13783for as_dir in $PATH
13784do
13785  IFS=$as_save_IFS
13786  test -z "$as_dir" && as_dir=.
13787    for ac_exec_ext in '' $ac_executable_extensions; do
13788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13789    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13791    break 2
13792  fi
13793done
13794  done
13795IFS=$as_save_IFS
13796
13797  ;;
13798esac
13799fi
13800CYGPATH=$ac_cv_path_CYGPATH
13801if test -n "$CYGPATH"; then
13802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13803$as_echo "$CYGPATH" >&6; }
13804else
13805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13806$as_echo "no" >&6; }
13807fi
13808
13809
13810          if test "x$CYGPATH" = x; then
13811            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13812          fi
13813        else
13814          # Otherwise we believe it is a complete path. Use it as it is.
13815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13816$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13817          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13818$as_echo_n "checking for CYGPATH... " >&6; }
13819          if test ! -x "$tool_specified"; then
13820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13821$as_echo "not found" >&6; }
13822            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13823          fi
13824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13825$as_echo "$tool_specified" >&6; }
13826        fi
13827      fi
13828    fi
13829
13830  fi
13831
13832
13833
13834
13835  # Publish this variable in the help.
13836
13837
13838  if [ -z "${READLINK+x}" ]; then
13839    # The variable is not set by user, try to locate tool using the code snippet
13840    for ac_prog in greadlink readlink
13841do
13842  # Extract the first word of "$ac_prog", so it can be a program name with args.
13843set dummy $ac_prog; ac_word=$2
13844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13845$as_echo_n "checking for $ac_word... " >&6; }
13846if ${ac_cv_path_READLINK+:} false; then :
13847  $as_echo_n "(cached) " >&6
13848else
13849  case $READLINK in
13850  [\\/]* | ?:[\\/]*)
13851  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13852  ;;
13853  *)
13854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13855for as_dir in $PATH
13856do
13857  IFS=$as_save_IFS
13858  test -z "$as_dir" && as_dir=.
13859    for ac_exec_ext in '' $ac_executable_extensions; do
13860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13861    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13863    break 2
13864  fi
13865done
13866  done
13867IFS=$as_save_IFS
13868
13869  ;;
13870esac
13871fi
13872READLINK=$ac_cv_path_READLINK
13873if test -n "$READLINK"; then
13874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13875$as_echo "$READLINK" >&6; }
13876else
13877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13878$as_echo "no" >&6; }
13879fi
13880
13881
13882  test -n "$READLINK" && break
13883done
13884
13885  else
13886    # The variable is set, but is it from the command line or the environment?
13887
13888    # Try to remove the string !READLINK! from our list.
13889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13891      # If it failed, the variable was not from the command line. Ignore it,
13892      # but warn the user (except for BASH, which is always set by the calling BASH).
13893      if test "xREADLINK" != xBASH; then
13894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13895$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13896      fi
13897      # Try to locate tool using the code snippet
13898      for ac_prog in greadlink readlink
13899do
13900  # Extract the first word of "$ac_prog", so it can be a program name with args.
13901set dummy $ac_prog; ac_word=$2
13902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13903$as_echo_n "checking for $ac_word... " >&6; }
13904if ${ac_cv_path_READLINK+:} false; then :
13905  $as_echo_n "(cached) " >&6
13906else
13907  case $READLINK in
13908  [\\/]* | ?:[\\/]*)
13909  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13910  ;;
13911  *)
13912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13913for as_dir in $PATH
13914do
13915  IFS=$as_save_IFS
13916  test -z "$as_dir" && as_dir=.
13917    for ac_exec_ext in '' $ac_executable_extensions; do
13918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13919    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13921    break 2
13922  fi
13923done
13924  done
13925IFS=$as_save_IFS
13926
13927  ;;
13928esac
13929fi
13930READLINK=$ac_cv_path_READLINK
13931if test -n "$READLINK"; then
13932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13933$as_echo "$READLINK" >&6; }
13934else
13935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13936$as_echo "no" >&6; }
13937fi
13938
13939
13940  test -n "$READLINK" && break
13941done
13942
13943    else
13944      # If it succeeded, then it was overridden by the user. We will use it
13945      # for the tool.
13946
13947      # First remove it from the list of overridden variables, so we can test
13948      # for unknown variables in the end.
13949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13950
13951      # Check if we try to supply an empty value
13952      if test "x$READLINK" = x; then
13953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13954$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13956$as_echo_n "checking for READLINK... " >&6; }
13957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13958$as_echo "disabled" >&6; }
13959      else
13960        # Check if the provided tool contains a complete path.
13961        tool_specified="$READLINK"
13962        tool_basename="${tool_specified##*/}"
13963        if test "x$tool_basename" = "x$tool_specified"; then
13964          # A command without a complete path is provided, search $PATH.
13965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13966$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13967          # Extract the first word of "$tool_basename", so it can be a program name with args.
13968set dummy $tool_basename; ac_word=$2
13969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13970$as_echo_n "checking for $ac_word... " >&6; }
13971if ${ac_cv_path_READLINK+:} false; then :
13972  $as_echo_n "(cached) " >&6
13973else
13974  case $READLINK in
13975  [\\/]* | ?:[\\/]*)
13976  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13977  ;;
13978  *)
13979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13980for as_dir in $PATH
13981do
13982  IFS=$as_save_IFS
13983  test -z "$as_dir" && as_dir=.
13984    for ac_exec_ext in '' $ac_executable_extensions; do
13985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13986    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13988    break 2
13989  fi
13990done
13991  done
13992IFS=$as_save_IFS
13993
13994  ;;
13995esac
13996fi
13997READLINK=$ac_cv_path_READLINK
13998if test -n "$READLINK"; then
13999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14000$as_echo "$READLINK" >&6; }
14001else
14002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14003$as_echo "no" >&6; }
14004fi
14005
14006
14007          if test "x$READLINK" = x; then
14008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14009          fi
14010        else
14011          # Otherwise we believe it is a complete path. Use it as it is.
14012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14013$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14015$as_echo_n "checking for READLINK... " >&6; }
14016          if test ! -x "$tool_specified"; then
14017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14018$as_echo "not found" >&6; }
14019            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14020          fi
14021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14022$as_echo "$tool_specified" >&6; }
14023        fi
14024      fi
14025    fi
14026
14027  fi
14028
14029
14030
14031
14032  # Publish this variable in the help.
14033
14034
14035  if [ -z "${DF+x}" ]; then
14036    # The variable is not set by user, try to locate tool using the code snippet
14037    for ac_prog in df
14038do
14039  # Extract the first word of "$ac_prog", so it can be a program name with args.
14040set dummy $ac_prog; ac_word=$2
14041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14042$as_echo_n "checking for $ac_word... " >&6; }
14043if ${ac_cv_path_DF+:} false; then :
14044  $as_echo_n "(cached) " >&6
14045else
14046  case $DF in
14047  [\\/]* | ?:[\\/]*)
14048  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14049  ;;
14050  *)
14051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14052for as_dir in $PATH
14053do
14054  IFS=$as_save_IFS
14055  test -z "$as_dir" && as_dir=.
14056    for ac_exec_ext in '' $ac_executable_extensions; do
14057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14058    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14060    break 2
14061  fi
14062done
14063  done
14064IFS=$as_save_IFS
14065
14066  ;;
14067esac
14068fi
14069DF=$ac_cv_path_DF
14070if test -n "$DF"; then
14071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14072$as_echo "$DF" >&6; }
14073else
14074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14075$as_echo "no" >&6; }
14076fi
14077
14078
14079  test -n "$DF" && break
14080done
14081
14082  else
14083    # The variable is set, but is it from the command line or the environment?
14084
14085    # Try to remove the string !DF! from our list.
14086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14088      # If it failed, the variable was not from the command line. Ignore it,
14089      # but warn the user (except for BASH, which is always set by the calling BASH).
14090      if test "xDF" != xBASH; then
14091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14092$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14093      fi
14094      # Try to locate tool using the code snippet
14095      for ac_prog in df
14096do
14097  # Extract the first word of "$ac_prog", so it can be a program name with args.
14098set dummy $ac_prog; ac_word=$2
14099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14100$as_echo_n "checking for $ac_word... " >&6; }
14101if ${ac_cv_path_DF+:} false; then :
14102  $as_echo_n "(cached) " >&6
14103else
14104  case $DF in
14105  [\\/]* | ?:[\\/]*)
14106  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14107  ;;
14108  *)
14109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14110for as_dir in $PATH
14111do
14112  IFS=$as_save_IFS
14113  test -z "$as_dir" && as_dir=.
14114    for ac_exec_ext in '' $ac_executable_extensions; do
14115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14116    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14118    break 2
14119  fi
14120done
14121  done
14122IFS=$as_save_IFS
14123
14124  ;;
14125esac
14126fi
14127DF=$ac_cv_path_DF
14128if test -n "$DF"; then
14129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14130$as_echo "$DF" >&6; }
14131else
14132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14133$as_echo "no" >&6; }
14134fi
14135
14136
14137  test -n "$DF" && break
14138done
14139
14140    else
14141      # If it succeeded, then it was overridden by the user. We will use it
14142      # for the tool.
14143
14144      # First remove it from the list of overridden variables, so we can test
14145      # for unknown variables in the end.
14146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14147
14148      # Check if we try to supply an empty value
14149      if test "x$DF" = x; then
14150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14151$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14153$as_echo_n "checking for DF... " >&6; }
14154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14155$as_echo "disabled" >&6; }
14156      else
14157        # Check if the provided tool contains a complete path.
14158        tool_specified="$DF"
14159        tool_basename="${tool_specified##*/}"
14160        if test "x$tool_basename" = "x$tool_specified"; then
14161          # A command without a complete path is provided, search $PATH.
14162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14163$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14164          # Extract the first word of "$tool_basename", so it can be a program name with args.
14165set dummy $tool_basename; ac_word=$2
14166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14167$as_echo_n "checking for $ac_word... " >&6; }
14168if ${ac_cv_path_DF+:} false; then :
14169  $as_echo_n "(cached) " >&6
14170else
14171  case $DF in
14172  [\\/]* | ?:[\\/]*)
14173  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14174  ;;
14175  *)
14176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14177for as_dir in $PATH
14178do
14179  IFS=$as_save_IFS
14180  test -z "$as_dir" && as_dir=.
14181    for ac_exec_ext in '' $ac_executable_extensions; do
14182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14183    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14185    break 2
14186  fi
14187done
14188  done
14189IFS=$as_save_IFS
14190
14191  ;;
14192esac
14193fi
14194DF=$ac_cv_path_DF
14195if test -n "$DF"; then
14196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14197$as_echo "$DF" >&6; }
14198else
14199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14200$as_echo "no" >&6; }
14201fi
14202
14203
14204          if test "x$DF" = x; then
14205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14206          fi
14207        else
14208          # Otherwise we believe it is a complete path. Use it as it is.
14209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14210$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14212$as_echo_n "checking for DF... " >&6; }
14213          if test ! -x "$tool_specified"; then
14214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14215$as_echo "not found" >&6; }
14216            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14217          fi
14218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14219$as_echo "$tool_specified" >&6; }
14220        fi
14221      fi
14222    fi
14223
14224  fi
14225
14226
14227
14228
14229  # Publish this variable in the help.
14230
14231
14232  if [ -z "${CPIO+x}" ]; then
14233    # The variable is not set by user, try to locate tool using the code snippet
14234    for ac_prog in cpio bsdcpio
14235do
14236  # Extract the first word of "$ac_prog", so it can be a program name with args.
14237set dummy $ac_prog; ac_word=$2
14238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14239$as_echo_n "checking for $ac_word... " >&6; }
14240if ${ac_cv_path_CPIO+:} false; then :
14241  $as_echo_n "(cached) " >&6
14242else
14243  case $CPIO in
14244  [\\/]* | ?:[\\/]*)
14245  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14246  ;;
14247  *)
14248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14249for as_dir in $PATH
14250do
14251  IFS=$as_save_IFS
14252  test -z "$as_dir" && as_dir=.
14253    for ac_exec_ext in '' $ac_executable_extensions; do
14254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14255    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14257    break 2
14258  fi
14259done
14260  done
14261IFS=$as_save_IFS
14262
14263  ;;
14264esac
14265fi
14266CPIO=$ac_cv_path_CPIO
14267if test -n "$CPIO"; then
14268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14269$as_echo "$CPIO" >&6; }
14270else
14271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14272$as_echo "no" >&6; }
14273fi
14274
14275
14276  test -n "$CPIO" && break
14277done
14278
14279  else
14280    # The variable is set, but is it from the command line or the environment?
14281
14282    # Try to remove the string !CPIO! from our list.
14283    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14284    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14285      # If it failed, the variable was not from the command line. Ignore it,
14286      # but warn the user (except for BASH, which is always set by the calling BASH).
14287      if test "xCPIO" != xBASH; then
14288        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14289$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14290      fi
14291      # Try to locate tool using the code snippet
14292      for ac_prog in cpio bsdcpio
14293do
14294  # Extract the first word of "$ac_prog", so it can be a program name with args.
14295set dummy $ac_prog; ac_word=$2
14296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14297$as_echo_n "checking for $ac_word... " >&6; }
14298if ${ac_cv_path_CPIO+:} false; then :
14299  $as_echo_n "(cached) " >&6
14300else
14301  case $CPIO in
14302  [\\/]* | ?:[\\/]*)
14303  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14304  ;;
14305  *)
14306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14307for as_dir in $PATH
14308do
14309  IFS=$as_save_IFS
14310  test -z "$as_dir" && as_dir=.
14311    for ac_exec_ext in '' $ac_executable_extensions; do
14312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14313    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14315    break 2
14316  fi
14317done
14318  done
14319IFS=$as_save_IFS
14320
14321  ;;
14322esac
14323fi
14324CPIO=$ac_cv_path_CPIO
14325if test -n "$CPIO"; then
14326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14327$as_echo "$CPIO" >&6; }
14328else
14329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14330$as_echo "no" >&6; }
14331fi
14332
14333
14334  test -n "$CPIO" && break
14335done
14336
14337    else
14338      # If it succeeded, then it was overridden by the user. We will use it
14339      # for the tool.
14340
14341      # First remove it from the list of overridden variables, so we can test
14342      # for unknown variables in the end.
14343      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14344
14345      # Check if we try to supply an empty value
14346      if test "x$CPIO" = x; then
14347        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14348$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14350$as_echo_n "checking for CPIO... " >&6; }
14351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14352$as_echo "disabled" >&6; }
14353      else
14354        # Check if the provided tool contains a complete path.
14355        tool_specified="$CPIO"
14356        tool_basename="${tool_specified##*/}"
14357        if test "x$tool_basename" = "x$tool_specified"; then
14358          # A command without a complete path is provided, search $PATH.
14359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14360$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14361          # Extract the first word of "$tool_basename", so it can be a program name with args.
14362set dummy $tool_basename; ac_word=$2
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14364$as_echo_n "checking for $ac_word... " >&6; }
14365if ${ac_cv_path_CPIO+:} false; then :
14366  $as_echo_n "(cached) " >&6
14367else
14368  case $CPIO in
14369  [\\/]* | ?:[\\/]*)
14370  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14371  ;;
14372  *)
14373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14374for as_dir in $PATH
14375do
14376  IFS=$as_save_IFS
14377  test -z "$as_dir" && as_dir=.
14378    for ac_exec_ext in '' $ac_executable_extensions; do
14379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14380    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14382    break 2
14383  fi
14384done
14385  done
14386IFS=$as_save_IFS
14387
14388  ;;
14389esac
14390fi
14391CPIO=$ac_cv_path_CPIO
14392if test -n "$CPIO"; then
14393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14394$as_echo "$CPIO" >&6; }
14395else
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14397$as_echo "no" >&6; }
14398fi
14399
14400
14401          if test "x$CPIO" = x; then
14402            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14403          fi
14404        else
14405          # Otherwise we believe it is a complete path. Use it as it is.
14406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14407$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14408          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14409$as_echo_n "checking for CPIO... " >&6; }
14410          if test ! -x "$tool_specified"; then
14411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14412$as_echo "not found" >&6; }
14413            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14414          fi
14415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14416$as_echo "$tool_specified" >&6; }
14417        fi
14418      fi
14419    fi
14420
14421  fi
14422
14423
14424
14425
14426  # Publish this variable in the help.
14427
14428
14429  if [ -z "${NICE+x}" ]; then
14430    # The variable is not set by user, try to locate tool using the code snippet
14431    for ac_prog in nice
14432do
14433  # Extract the first word of "$ac_prog", so it can be a program name with args.
14434set dummy $ac_prog; ac_word=$2
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14436$as_echo_n "checking for $ac_word... " >&6; }
14437if ${ac_cv_path_NICE+:} false; then :
14438  $as_echo_n "(cached) " >&6
14439else
14440  case $NICE in
14441  [\\/]* | ?:[\\/]*)
14442  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14443  ;;
14444  *)
14445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14446for as_dir in $PATH
14447do
14448  IFS=$as_save_IFS
14449  test -z "$as_dir" && as_dir=.
14450    for ac_exec_ext in '' $ac_executable_extensions; do
14451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14452    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14454    break 2
14455  fi
14456done
14457  done
14458IFS=$as_save_IFS
14459
14460  ;;
14461esac
14462fi
14463NICE=$ac_cv_path_NICE
14464if test -n "$NICE"; then
14465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14466$as_echo "$NICE" >&6; }
14467else
14468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469$as_echo "no" >&6; }
14470fi
14471
14472
14473  test -n "$NICE" && break
14474done
14475
14476  else
14477    # The variable is set, but is it from the command line or the environment?
14478
14479    # Try to remove the string !NICE! from our list.
14480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14482      # If it failed, the variable was not from the command line. Ignore it,
14483      # but warn the user (except for BASH, which is always set by the calling BASH).
14484      if test "xNICE" != xBASH; then
14485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14486$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14487      fi
14488      # Try to locate tool using the code snippet
14489      for ac_prog in nice
14490do
14491  # Extract the first word of "$ac_prog", so it can be a program name with args.
14492set dummy $ac_prog; ac_word=$2
14493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14494$as_echo_n "checking for $ac_word... " >&6; }
14495if ${ac_cv_path_NICE+:} false; then :
14496  $as_echo_n "(cached) " >&6
14497else
14498  case $NICE in
14499  [\\/]* | ?:[\\/]*)
14500  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14501  ;;
14502  *)
14503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14504for as_dir in $PATH
14505do
14506  IFS=$as_save_IFS
14507  test -z "$as_dir" && as_dir=.
14508    for ac_exec_ext in '' $ac_executable_extensions; do
14509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14510    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14512    break 2
14513  fi
14514done
14515  done
14516IFS=$as_save_IFS
14517
14518  ;;
14519esac
14520fi
14521NICE=$ac_cv_path_NICE
14522if test -n "$NICE"; then
14523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14524$as_echo "$NICE" >&6; }
14525else
14526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14527$as_echo "no" >&6; }
14528fi
14529
14530
14531  test -n "$NICE" && break
14532done
14533
14534    else
14535      # If it succeeded, then it was overridden by the user. We will use it
14536      # for the tool.
14537
14538      # First remove it from the list of overridden variables, so we can test
14539      # for unknown variables in the end.
14540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14541
14542      # Check if we try to supply an empty value
14543      if test "x$NICE" = x; then
14544        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14545$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14547$as_echo_n "checking for NICE... " >&6; }
14548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14549$as_echo "disabled" >&6; }
14550      else
14551        # Check if the provided tool contains a complete path.
14552        tool_specified="$NICE"
14553        tool_basename="${tool_specified##*/}"
14554        if test "x$tool_basename" = "x$tool_specified"; then
14555          # A command without a complete path is provided, search $PATH.
14556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14557$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14558          # Extract the first word of "$tool_basename", so it can be a program name with args.
14559set dummy $tool_basename; ac_word=$2
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14561$as_echo_n "checking for $ac_word... " >&6; }
14562if ${ac_cv_path_NICE+:} false; then :
14563  $as_echo_n "(cached) " >&6
14564else
14565  case $NICE in
14566  [\\/]* | ?:[\\/]*)
14567  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14568  ;;
14569  *)
14570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14571for as_dir in $PATH
14572do
14573  IFS=$as_save_IFS
14574  test -z "$as_dir" && as_dir=.
14575    for ac_exec_ext in '' $ac_executable_extensions; do
14576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14577    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14579    break 2
14580  fi
14581done
14582  done
14583IFS=$as_save_IFS
14584
14585  ;;
14586esac
14587fi
14588NICE=$ac_cv_path_NICE
14589if test -n "$NICE"; then
14590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14591$as_echo "$NICE" >&6; }
14592else
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14594$as_echo "no" >&6; }
14595fi
14596
14597
14598          if test "x$NICE" = x; then
14599            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14600          fi
14601        else
14602          # Otherwise we believe it is a complete path. Use it as it is.
14603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14604$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14605          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14606$as_echo_n "checking for NICE... " >&6; }
14607          if test ! -x "$tool_specified"; then
14608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14609$as_echo "not found" >&6; }
14610            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14611          fi
14612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14613$as_echo "$tool_specified" >&6; }
14614        fi
14615      fi
14616    fi
14617
14618  fi
14619
14620
14621
14622
14623# Now we can determine OpenJDK build and target platforms. This is required to
14624# have early on.
14625# Make sure we can run config.sub.
14626$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14627  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14628
14629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14630$as_echo_n "checking build system type... " >&6; }
14631if ${ac_cv_build+:} false; then :
14632  $as_echo_n "(cached) " >&6
14633else
14634  ac_build_alias=$build_alias
14635test "x$ac_build_alias" = x &&
14636  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14637test "x$ac_build_alias" = x &&
14638  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14639ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14640  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14641
14642fi
14643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14644$as_echo "$ac_cv_build" >&6; }
14645case $ac_cv_build in
14646*-*-*) ;;
14647*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14648esac
14649build=$ac_cv_build
14650ac_save_IFS=$IFS; IFS='-'
14651set x $ac_cv_build
14652shift
14653build_cpu=$1
14654build_vendor=$2
14655shift; shift
14656# Remember, the first character of IFS is used to create $*,
14657# except with old shells:
14658build_os=$*
14659IFS=$ac_save_IFS
14660case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14661
14662
14663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14664$as_echo_n "checking host system type... " >&6; }
14665if ${ac_cv_host+:} false; then :
14666  $as_echo_n "(cached) " >&6
14667else
14668  if test "x$host_alias" = x; then
14669  ac_cv_host=$ac_cv_build
14670else
14671  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14672    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14673fi
14674
14675fi
14676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14677$as_echo "$ac_cv_host" >&6; }
14678case $ac_cv_host in
14679*-*-*) ;;
14680*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14681esac
14682host=$ac_cv_host
14683ac_save_IFS=$IFS; IFS='-'
14684set x $ac_cv_host
14685shift
14686host_cpu=$1
14687host_vendor=$2
14688shift; shift
14689# Remember, the first character of IFS is used to create $*,
14690# except with old shells:
14691host_os=$*
14692IFS=$ac_save_IFS
14693case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14694
14695
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14697$as_echo_n "checking target system type... " >&6; }
14698if ${ac_cv_target+:} false; then :
14699  $as_echo_n "(cached) " >&6
14700else
14701  if test "x$target_alias" = x; then
14702  ac_cv_target=$ac_cv_host
14703else
14704  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14705    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14706fi
14707
14708fi
14709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14710$as_echo "$ac_cv_target" >&6; }
14711case $ac_cv_target in
14712*-*-*) ;;
14713*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14714esac
14715target=$ac_cv_target
14716ac_save_IFS=$IFS; IFS='-'
14717set x $ac_cv_target
14718shift
14719target_cpu=$1
14720target_vendor=$2
14721shift; shift
14722# Remember, the first character of IFS is used to create $*,
14723# except with old shells:
14724target_os=$*
14725IFS=$ac_save_IFS
14726case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14727
14728
14729# The aliases save the names the user supplied, while $host etc.
14730# will get canonicalized.
14731test -n "$target_alias" &&
14732  test "$program_prefix$program_suffix$program_transform_name" = \
14733    NONENONEs,x,x, &&
14734  program_prefix=${target_alias}-
14735
14736  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14737  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14738  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14739  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14740  # to use the configure naming style.
14741
14742
14743
14744
14745
14746  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14747  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14748  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14749  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14750  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14751  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14752
14753
14754
14755  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14756
14757  case "$build_os" in
14758    *linux*)
14759      VAR_OS=linux
14760      VAR_OS_TYPE=unix
14761      ;;
14762    *solaris*)
14763      VAR_OS=solaris
14764      VAR_OS_TYPE=unix
14765      ;;
14766    *darwin*)
14767      VAR_OS=macosx
14768      VAR_OS_TYPE=unix
14769      ;;
14770    *bsd*)
14771      VAR_OS=bsd
14772      VAR_OS_TYPE=unix
14773      ;;
14774    *cygwin*)
14775      VAR_OS=windows
14776      VAR_OS_ENV=windows.cygwin
14777      ;;
14778    *mingw*)
14779      VAR_OS=windows
14780      VAR_OS_ENV=windows.msys
14781      ;;
14782    *aix*)
14783      VAR_OS=aix
14784      VAR_OS_TYPE=unix
14785      ;;
14786    *)
14787      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14788      ;;
14789  esac
14790
14791
14792  # First argument is the cpu name from the trip/quad
14793  case "$build_cpu" in
14794    x86_64)
14795      VAR_CPU=x86_64
14796      VAR_CPU_ARCH=x86
14797      VAR_CPU_BITS=64
14798      VAR_CPU_ENDIAN=little
14799      ;;
14800    i?86)
14801      VAR_CPU=x86
14802      VAR_CPU_ARCH=x86
14803      VAR_CPU_BITS=32
14804      VAR_CPU_ENDIAN=little
14805      ;;
14806    arm*)
14807      VAR_CPU=arm
14808      VAR_CPU_ARCH=arm
14809      VAR_CPU_BITS=32
14810      VAR_CPU_ENDIAN=little
14811      ;;
14812    aarch64)
14813      VAR_CPU=aarch64
14814      VAR_CPU_ARCH=aarch64
14815      VAR_CPU_BITS=64
14816      VAR_CPU_ENDIAN=little
14817      ;;
14818    powerpc)
14819      VAR_CPU=ppc
14820      VAR_CPU_ARCH=ppc
14821      VAR_CPU_BITS=32
14822      VAR_CPU_ENDIAN=big
14823      ;;
14824    powerpc64)
14825      VAR_CPU=ppc64
14826      VAR_CPU_ARCH=ppc
14827      VAR_CPU_BITS=64
14828      VAR_CPU_ENDIAN=big
14829      ;;
14830    powerpc64le)
14831      VAR_CPU=ppc64le
14832      VAR_CPU_ARCH=ppc
14833      VAR_CPU_BITS=64
14834      VAR_CPU_ENDIAN=little
14835      ;;
14836    s390)
14837      VAR_CPU=s390
14838      VAR_CPU_ARCH=s390
14839      VAR_CPU_BITS=32
14840      VAR_CPU_ENDIAN=big
14841      ;;
14842    s390x)
14843      VAR_CPU=s390x
14844      VAR_CPU_ARCH=s390
14845      VAR_CPU_BITS=64
14846      VAR_CPU_ENDIAN=big
14847      ;;
14848    sparc)
14849      VAR_CPU=sparc
14850      VAR_CPU_ARCH=sparc
14851      VAR_CPU_BITS=32
14852      VAR_CPU_ENDIAN=big
14853      ;;
14854    sparcv9|sparc64)
14855      VAR_CPU=sparcv9
14856      VAR_CPU_ARCH=sparc
14857      VAR_CPU_BITS=64
14858      VAR_CPU_ENDIAN=big
14859      ;;
14860    *)
14861      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14862      ;;
14863  esac
14864
14865  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14866  OPENJDK_BUILD_OS="$VAR_OS"
14867  if test "x$VAR_OS_TYPE" != x; then
14868    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14869  else
14870    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14871  fi
14872  if test "x$VAR_OS_ENV" != x; then
14873    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14874  else
14875    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14876  fi
14877  OPENJDK_BUILD_CPU="$VAR_CPU"
14878  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14879  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14880  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14881
14882
14883
14884
14885
14886
14887
14888
14889  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14890$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14892$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14893
14894  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14895
14896  case "$host_os" in
14897    *linux*)
14898      VAR_OS=linux
14899      VAR_OS_TYPE=unix
14900      ;;
14901    *solaris*)
14902      VAR_OS=solaris
14903      VAR_OS_TYPE=unix
14904      ;;
14905    *darwin*)
14906      VAR_OS=macosx
14907      VAR_OS_TYPE=unix
14908      ;;
14909    *bsd*)
14910      VAR_OS=bsd
14911      VAR_OS_TYPE=unix
14912      ;;
14913    *cygwin*)
14914      VAR_OS=windows
14915      VAR_OS_ENV=windows.cygwin
14916      ;;
14917    *mingw*)
14918      VAR_OS=windows
14919      VAR_OS_ENV=windows.msys
14920      ;;
14921    *aix*)
14922      VAR_OS=aix
14923      VAR_OS_TYPE=unix
14924      ;;
14925    *)
14926      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14927      ;;
14928  esac
14929
14930
14931  # First argument is the cpu name from the trip/quad
14932  case "$host_cpu" in
14933    x86_64)
14934      VAR_CPU=x86_64
14935      VAR_CPU_ARCH=x86
14936      VAR_CPU_BITS=64
14937      VAR_CPU_ENDIAN=little
14938      ;;
14939    i?86)
14940      VAR_CPU=x86
14941      VAR_CPU_ARCH=x86
14942      VAR_CPU_BITS=32
14943      VAR_CPU_ENDIAN=little
14944      ;;
14945    arm*)
14946      VAR_CPU=arm
14947      VAR_CPU_ARCH=arm
14948      VAR_CPU_BITS=32
14949      VAR_CPU_ENDIAN=little
14950      ;;
14951    aarch64)
14952      VAR_CPU=aarch64
14953      VAR_CPU_ARCH=aarch64
14954      VAR_CPU_BITS=64
14955      VAR_CPU_ENDIAN=little
14956      ;;
14957    powerpc)
14958      VAR_CPU=ppc
14959      VAR_CPU_ARCH=ppc
14960      VAR_CPU_BITS=32
14961      VAR_CPU_ENDIAN=big
14962      ;;
14963    powerpc64)
14964      VAR_CPU=ppc64
14965      VAR_CPU_ARCH=ppc
14966      VAR_CPU_BITS=64
14967      VAR_CPU_ENDIAN=big
14968      ;;
14969    powerpc64le)
14970      VAR_CPU=ppc64le
14971      VAR_CPU_ARCH=ppc
14972      VAR_CPU_BITS=64
14973      VAR_CPU_ENDIAN=little
14974      ;;
14975    s390)
14976      VAR_CPU=s390
14977      VAR_CPU_ARCH=s390
14978      VAR_CPU_BITS=32
14979      VAR_CPU_ENDIAN=big
14980      ;;
14981    s390x)
14982      VAR_CPU=s390x
14983      VAR_CPU_ARCH=s390
14984      VAR_CPU_BITS=64
14985      VAR_CPU_ENDIAN=big
14986      ;;
14987    sparc)
14988      VAR_CPU=sparc
14989      VAR_CPU_ARCH=sparc
14990      VAR_CPU_BITS=32
14991      VAR_CPU_ENDIAN=big
14992      ;;
14993    sparcv9|sparc64)
14994      VAR_CPU=sparcv9
14995      VAR_CPU_ARCH=sparc
14996      VAR_CPU_BITS=64
14997      VAR_CPU_ENDIAN=big
14998      ;;
14999    *)
15000      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15001      ;;
15002  esac
15003
15004  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15005  OPENJDK_TARGET_OS="$VAR_OS"
15006  if test "x$VAR_OS_TYPE" != x; then
15007    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15008  else
15009    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15010  fi
15011  if test "x$VAR_OS_ENV" != x; then
15012    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15013  else
15014    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15015  fi
15016  OPENJDK_TARGET_CPU="$VAR_CPU"
15017  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15018  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15019  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15020
15021
15022
15023
15024
15025
15026
15027
15028  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15029$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15031$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15032
15033
15034
15035# Check whether --with-target-bits was given.
15036if test "${with_target_bits+set}" = set; then :
15037  withval=$with_target_bits;
15038fi
15039
15040
15041  # We have three types of compiles:
15042  # native  == normal compilation, target system == build system
15043  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15044  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15045  #
15046  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15047    # We're doing a proper cross-compilation
15048    COMPILE_TYPE="cross"
15049  else
15050    COMPILE_TYPE="native"
15051  fi
15052
15053  if test "x$with_target_bits" != x; then
15054    if test "x$COMPILE_TYPE" = "xcross"; then
15055      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15056    fi
15057
15058    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15059      # A reduced build is requested
15060      COMPILE_TYPE="reduced"
15061      OPENJDK_TARGET_CPU_BITS=32
15062      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15063        OPENJDK_TARGET_CPU=x86
15064      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15065        OPENJDK_TARGET_CPU=sparc
15066      else
15067        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15068      fi
15069    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15070      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
15071    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15072      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15073$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15074    else
15075      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15076    fi
15077  fi
15078
15079
15080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15081$as_echo_n "checking compilation type... " >&6; }
15082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15083$as_echo "$COMPILE_TYPE" >&6; }
15084
15085
15086  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15087    REQUIRED_OS_NAME=SunOS
15088    REQUIRED_OS_VERSION=5.10
15089  fi
15090  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15091    REQUIRED_OS_NAME=Linux
15092    REQUIRED_OS_VERSION=2.6
15093  fi
15094  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15095    REQUIRED_OS_NAME=Windows
15096    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15097      REQUIRED_OS_VERSION=5.2
15098    else
15099      REQUIRED_OS_VERSION=5.1
15100    fi
15101  fi
15102  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15103    REQUIRED_OS_NAME=Darwin
15104    REQUIRED_OS_VERSION=11.2
15105  fi
15106
15107
15108
15109
15110
15111  # Also store the legacy naming of the cpu.
15112  # Ie i586 and amd64 instead of x86 and x86_64
15113  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15114  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15115    OPENJDK_TARGET_CPU_LEGACY="i586"
15116  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15117    # On all platforms except MacOSX replace x86_64 with amd64.
15118    OPENJDK_TARGET_CPU_LEGACY="amd64"
15119  fi
15120
15121
15122  # And the second legacy naming of the cpu.
15123  # Ie i386 and amd64 instead of x86 and x86_64.
15124  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15125  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15126    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15127  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15128    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15129  fi
15130
15131
15132  # This is the name of the cpu (but using i386 and amd64 instead of
15133  # x86 and x86_64, respectively), preceeded by a /, to be used when
15134  # locating libraries. On macosx, it's empty, though.
15135  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15136  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15137    OPENJDK_TARGET_CPU_LIBDIR=""
15138  fi
15139
15140
15141  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15142  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15143  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15144  OPENJDK_TARGET_CPU_ISADIR=""
15145  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15146    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15147      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15148    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15149      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15150    fi
15151  fi
15152
15153
15154  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15155  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15156  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15157    # On linux only, we replace x86 with i386.
15158    OPENJDK_TARGET_CPU_OSARCH="i386"
15159  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15160    # On all platforms except macosx, we replace x86_64 with amd64.
15161    OPENJDK_TARGET_CPU_OSARCH="amd64"
15162  fi
15163
15164
15165  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15166  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15167    OPENJDK_TARGET_CPU_JLI="i386"
15168  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15169    # On all platforms except macosx, we replace x86_64 with amd64.
15170    OPENJDK_TARGET_CPU_JLI="amd64"
15171  fi
15172  # Now setup the -D flags for building libjli.
15173  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15174  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15175    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15176      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15177    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15178      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15179    fi
15180  fi
15181
15182
15183  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15184      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15185  else
15186      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15187  fi
15188
15189
15190  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15191    A_LP64="LP64:="
15192    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15193    # unpack200.exe
15194    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15195      ADD_LP64="-D_LP64=1"
15196    fi
15197  fi
15198  LP64=$A_LP64
15199
15200
15201  if test "x$COMPILE_TYPE" = "xcross"; then
15202    # FIXME: ... or should this include reduced builds..?
15203    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15204  else
15205    DEFINE_CROSS_COMPILE_ARCH=""
15206  fi
15207
15208
15209  # ZERO_ARCHDEF is used to enable architecture-specific code
15210  case "${OPENJDK_TARGET_CPU}" in
15211    ppc)     ZERO_ARCHDEF=PPC32 ;;
15212    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15213    s390*)   ZERO_ARCHDEF=S390  ;;
15214    sparc*)  ZERO_ARCHDEF=SPARC ;;
15215    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15216    x86)     ZERO_ARCHDEF=IA32  ;;
15217    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15218  esac
15219
15220
15221
15222
15223# Continue setting up basic stuff. Most remaining code require fundamental tools.
15224
15225  # Save the current directory this script was started from
15226  CURDIR="$PWD"
15227
15228  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15229  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15230  # was not available at that time.
15231  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15232  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15233    ORIGINAL_PATH="$REWRITTEN_PATH"
15234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15235$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15236  fi
15237
15238  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15239    PATH_SEP=";"
15240
15241  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15242  if test $SRC_ROOT_LENGTH -gt 100; then
15243    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15244  fi
15245
15246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15248$as_echo_n "checking cygwin release... " >&6; }
15249    CYGWIN_VERSION=`$UNAME -r`
15250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15251$as_echo "$CYGWIN_VERSION" >&6; }
15252    WINDOWS_ENV_VENDOR='cygwin'
15253    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15254
15255    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15256    if test "x$CYGWIN_VERSION_OLD" != x; then
15257      { $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
15258$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;}
15259      as_fn_error $? "Cannot continue" "$LINENO" 5
15260    fi
15261    if test "x$CYGPATH" = x; then
15262      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15263    fi
15264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15265$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15266    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15267    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15268    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15269    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15271$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15272    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15273    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15274    if test "x$test_cygdrive_prefix" = x; then
15275      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15276    fi
15277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15278    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15279$as_echo_n "checking msys release... " >&6; }
15280    MSYS_VERSION=`$UNAME -r`
15281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15282$as_echo "$MSYS_VERSION" >&6; }
15283
15284    WINDOWS_ENV_VENDOR='msys'
15285    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15286
15287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15288$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15289    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15290    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15291
15292  windows_path="$MSYS_ROOT_PATH"
15293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15294    unix_path=`$CYGPATH -u "$windows_path"`
15295    MSYS_ROOT_PATH="$unix_path"
15296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15298    MSYS_ROOT_PATH="$unix_path"
15299  fi
15300
15301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15302$as_echo "$MSYS_ROOT_PATH" >&6; }
15303    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15304  else
15305    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15306  fi
15307
15308  # Test if windows or unix (cygwin/msys) find is first in path.
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15310$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15311  FIND_BINARY_OUTPUT=`find --version 2>&1`
15312  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15314$as_echo "unix style" >&6; }
15315  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15317$as_echo "Windows" >&6; }
15318    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15319$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15320    { $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
15321$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15322    as_fn_error $? "Cannot continue" "$LINENO" 5
15323  else
15324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15325$as_echo "unknown" >&6; }
15326    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15327$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15328  fi
15329
15330  else
15331    PATH_SEP=":"
15332  fi
15333
15334
15335  # We get the top-level directory from the supporting wrappers.
15336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15337$as_echo_n "checking for top-level directory... " >&6; }
15338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15339$as_echo "$TOPDIR" >&6; }
15340
15341
15342  # Save the original version of TOPDIR for string comparisons
15343  ORIGINAL_TOPDIR="$TOPDIR"
15344
15345
15346  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15347
15348  # Only process if variable expands to non-empty
15349
15350  if test "x$CURDIR" != x; then
15351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15352
15353  # Input might be given as Windows format, start by converting to
15354  # unix format.
15355  path="$CURDIR"
15356  new_path=`$CYGPATH -u "$path"`
15357
15358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15361  # "foo.exe" is OK but "foo" is an error.
15362  #
15363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15364  # It is also a way to make sure we got the proper file name for the real test later on.
15365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15366  if test "x$test_shortpath" = x; then
15367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15368$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15369    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15370  fi
15371
15372  # Call helper function which possibly converts this using DOS-style short mode.
15373  # If so, the updated path is stored in $new_path.
15374
15375  input_path="$new_path"
15376  # Check if we need to convert this using DOS-style short mode. If the path
15377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15378  # take no chances and rewrite it.
15379  # Note: m4 eats our [], so we need to use [ and ] instead.
15380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15381  if test "x$has_forbidden_chars" != x; then
15382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15386      # Going to short mode and back again did indeed matter. Since short mode is
15387      # case insensitive, let's make it lowercase to improve readability.
15388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15389      # Now convert it back to Unix-style (cygpath)
15390      input_path=`$CYGPATH -u "$shortmode_path"`
15391      new_path="$input_path"
15392    fi
15393  fi
15394
15395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15396  if test "x$test_cygdrive_prefix" = x; then
15397    # As a simple fix, exclude /usr/bin since it's not a real path.
15398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15400      # a path prefixed by /cygdrive for fixpath to work.
15401      new_path="$CYGWIN_ROOT_PATH$input_path"
15402    fi
15403  fi
15404
15405
15406  if test "x$path" != "x$new_path"; then
15407    CURDIR="$new_path"
15408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15409$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15410  fi
15411
15412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15413
15414  path="$CURDIR"
15415  has_colon=`$ECHO $path | $GREP ^.:`
15416  new_path="$path"
15417  if test "x$has_colon" = x; then
15418    # Not in mixed or Windows style, start by that.
15419    new_path=`cmd //c echo $path`
15420  fi
15421
15422
15423  input_path="$new_path"
15424  # Check if we need to convert this using DOS-style short mode. If the path
15425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15426  # take no chances and rewrite it.
15427  # Note: m4 eats our [], so we need to use [ and ] instead.
15428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15429  if test "x$has_forbidden_chars" != x; then
15430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15432  fi
15433
15434
15435  windows_path="$new_path"
15436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15437    unix_path=`$CYGPATH -u "$windows_path"`
15438    new_path="$unix_path"
15439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15441    new_path="$unix_path"
15442  fi
15443
15444  if test "x$path" != "x$new_path"; then
15445    CURDIR="$new_path"
15446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15447$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15448  fi
15449
15450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15452
15453    else
15454      # We're on a unix platform. Hooray! :)
15455      path="$CURDIR"
15456      has_space=`$ECHO "$path" | $GREP " "`
15457      if test "x$has_space" != x; then
15458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15459$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15461      fi
15462
15463      # Use eval to expand a potential ~
15464      eval path="$path"
15465      if test ! -f "$path" && test ! -d "$path"; then
15466        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15467      fi
15468
15469      if test -d "$path"; then
15470        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15471      else
15472        dir="`$DIRNAME "$path"`"
15473        base="`$BASENAME "$path"`"
15474        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15475      fi
15476    fi
15477  fi
15478
15479
15480  # Only process if variable expands to non-empty
15481
15482  if test "x$TOPDIR" != x; then
15483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15484
15485  # Input might be given as Windows format, start by converting to
15486  # unix format.
15487  path="$TOPDIR"
15488  new_path=`$CYGPATH -u "$path"`
15489
15490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15493  # "foo.exe" is OK but "foo" is an error.
15494  #
15495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15496  # It is also a way to make sure we got the proper file name for the real test later on.
15497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15498  if test "x$test_shortpath" = x; then
15499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15500$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15501    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15502  fi
15503
15504  # Call helper function which possibly converts this using DOS-style short mode.
15505  # If so, the updated path is stored in $new_path.
15506
15507  input_path="$new_path"
15508  # Check if we need to convert this using DOS-style short mode. If the path
15509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15510  # take no chances and rewrite it.
15511  # Note: m4 eats our [], so we need to use [ and ] instead.
15512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15513  if test "x$has_forbidden_chars" != x; then
15514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15518      # Going to short mode and back again did indeed matter. Since short mode is
15519      # case insensitive, let's make it lowercase to improve readability.
15520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15521      # Now convert it back to Unix-style (cygpath)
15522      input_path=`$CYGPATH -u "$shortmode_path"`
15523      new_path="$input_path"
15524    fi
15525  fi
15526
15527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15528  if test "x$test_cygdrive_prefix" = x; then
15529    # As a simple fix, exclude /usr/bin since it's not a real path.
15530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15532      # a path prefixed by /cygdrive for fixpath to work.
15533      new_path="$CYGWIN_ROOT_PATH$input_path"
15534    fi
15535  fi
15536
15537
15538  if test "x$path" != "x$new_path"; then
15539    TOPDIR="$new_path"
15540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15541$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15542  fi
15543
15544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15545
15546  path="$TOPDIR"
15547  has_colon=`$ECHO $path | $GREP ^.:`
15548  new_path="$path"
15549  if test "x$has_colon" = x; then
15550    # Not in mixed or Windows style, start by that.
15551    new_path=`cmd //c echo $path`
15552  fi
15553
15554
15555  input_path="$new_path"
15556  # Check if we need to convert this using DOS-style short mode. If the path
15557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15558  # take no chances and rewrite it.
15559  # Note: m4 eats our [], so we need to use [ and ] instead.
15560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15561  if test "x$has_forbidden_chars" != x; then
15562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15564  fi
15565
15566
15567  windows_path="$new_path"
15568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15569    unix_path=`$CYGPATH -u "$windows_path"`
15570    new_path="$unix_path"
15571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15573    new_path="$unix_path"
15574  fi
15575
15576  if test "x$path" != "x$new_path"; then
15577    TOPDIR="$new_path"
15578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15579$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15580  fi
15581
15582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15584
15585    else
15586      # We're on a unix platform. Hooray! :)
15587      path="$TOPDIR"
15588      has_space=`$ECHO "$path" | $GREP " "`
15589      if test "x$has_space" != x; then
15590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15591$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15593      fi
15594
15595      # Use eval to expand a potential ~
15596      eval path="$path"
15597      if test ! -f "$path" && test ! -d "$path"; then
15598        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15599      fi
15600
15601      if test -d "$path"; then
15602        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15603      else
15604        dir="`$DIRNAME "$path"`"
15605        base="`$BASENAME "$path"`"
15606        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15607      fi
15608    fi
15609  fi
15610
15611  # SRC_ROOT is a traditional alias for TOPDIR.
15612  SRC_ROOT=$TOPDIR
15613
15614  # Calculate a canonical version of TOPDIR for string comparisons
15615  CANONICAL_TOPDIR=$TOPDIR
15616
15617  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15618    # Follow a chain of symbolic links. Use readlink
15619    # where it exists, else fall back to horribly
15620    # complicated shell code.
15621    if test "x$READLINK_TESTED" != yes; then
15622      # On MacOSX there is a readlink tool with a different
15623      # purpose than the GNU readlink tool. Check the found readlink.
15624      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15625      if test "x$ISGNU" = x; then
15626        # A readlink that we do not know how to use.
15627        # Are there other non-GNU readlinks out there?
15628        READLINK_TESTED=yes
15629        READLINK=
15630      fi
15631    fi
15632
15633    if test "x$READLINK" != x; then
15634      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15635    else
15636      # Save the current directory for restoring afterwards
15637      STARTDIR=$PWD
15638      COUNTER=0
15639      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15640      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15641      cd $sym_link_dir
15642      # Use -P flag to resolve symlinks in directories.
15643      cd `$THEPWDCMD -P`
15644      sym_link_dir=`$THEPWDCMD -P`
15645      # Resolve file symlinks
15646      while test $COUNTER -lt 20; do
15647        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15648        if test "x$ISLINK" == x; then
15649          # This is not a symbolic link! We are done!
15650          break
15651        fi
15652        # Again resolve directory symlinks since the target of the just found
15653        # link could be in a different directory
15654        cd `$DIRNAME $ISLINK`
15655        sym_link_dir=`$THEPWDCMD -P`
15656        sym_link_file=`$BASENAME $ISLINK`
15657        let COUNTER=COUNTER+1
15658      done
15659      cd $STARTDIR
15660      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15661    fi
15662  fi
15663
15664
15665
15666  # Locate the directory of this script.
15667  AUTOCONF_DIR=$TOPDIR/common/autoconf
15668
15669
15670# Check if it's a pure open build or if custom sources are to be used.
15671
15672  # Check whether --enable-openjdk-only was given.
15673if test "${enable_openjdk_only+set}" = set; then :
15674  enableval=$enable_openjdk_only;
15675else
15676  enable_openjdk_only="no"
15677fi
15678
15679
15680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15681$as_echo_n "checking for presence of closed sources... " >&6; }
15682  if test -d "$SRC_ROOT/jdk/src/closed"; then
15683    CLOSED_SOURCE_PRESENT=yes
15684  else
15685    CLOSED_SOURCE_PRESENT=no
15686  fi
15687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15688$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15689
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15691$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15692  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15694$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15695
15696  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15697    OPENJDK=true
15698    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15699      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15700$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15701    fi
15702  else
15703    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15704      OPENJDK=true
15705    else
15706      OPENJDK=false
15707    fi
15708  fi
15709
15710  if test "x$OPENJDK" = "xtrue"; then
15711    SET_OPENJDK="OPENJDK=true"
15712  fi
15713
15714
15715
15716  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15717  # the IncludeCustomExtension macro.
15718
15719
15720# Check whether --with-custom-make-dir was given.
15721if test "${with_custom_make_dir+set}" = set; then :
15722  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
15723$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15724fi
15725
15726
15727
15728
15729# These are needed to be able to create a configuration name (and thus the output directory)
15730
15731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15732$as_echo_n "checking which variant of the JDK to build... " >&6; }
15733
15734# Check whether --with-jdk-variant was given.
15735if test "${with_jdk_variant+set}" = set; then :
15736  withval=$with_jdk_variant;
15737fi
15738
15739
15740  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15741    JDK_VARIANT="normal"
15742  else
15743    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15744  fi
15745
15746
15747
15748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15749$as_echo "$JDK_VARIANT" >&6; }
15750
15751
15752
15753# Check whether --with-jvm-interpreter was given.
15754if test "${with_jvm_interpreter+set}" = set; then :
15755  withval=$with_jvm_interpreter;
15756fi
15757
15758
15759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15760$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15761  if test "x$with_jvm_interpreter" = x; then
15762    JVM_INTERPRETER="template"
15763  else
15764    JVM_INTERPRETER="$with_jvm_interpreter"
15765  fi
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_INTERPRETER" >&5
15767$as_echo "$JVM_INTERPRETER" >&6; }
15768
15769  if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15770    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15771  fi
15772
15773
15774
15775
15776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15777$as_echo_n "checking which variants of the JVM to build... " >&6; }
15778
15779# Check whether --with-jvm-variants was given.
15780if test "${with_jvm_variants+set}" = set; then :
15781  withval=$with_jvm_variants;
15782fi
15783
15784
15785  if test "x$with_jvm_variants" = x; then
15786    with_jvm_variants="server"
15787  fi
15788
15789  JVM_VARIANTS=",$with_jvm_variants,"
15790  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
15791
15792  if test "x$TEST_VARIANTS" != "x,"; then
15793    as_fn_error $? "The available JVM variants are: server, client, minimal1, zero, zeroshark, core" "$LINENO" 5
15794  fi
15795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15796$as_echo "$with_jvm_variants" >&6; }
15797
15798  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15799  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15800  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15801  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15802  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15803  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15804
15805  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15806    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15807      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15808    fi
15809  fi
15810  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15811    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15812      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15813    fi
15814  fi
15815
15816  # Replace the commas with AND for use in the build directory name.
15817  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15818  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
15819  if test "x$COUNT_VARIANTS" != "x,1"; then
15820    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15821  else
15822    BUILDING_MULTIPLE_JVM_VARIANTS=no
15823  fi
15824
15825  if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
15826    as_fn_error $? "You cannot build multiple variants with zero." "$LINENO" 5
15827  fi
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837  INCLUDE_SA=true
15838  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15839    INCLUDE_SA=false
15840  fi
15841  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15842    INCLUDE_SA=false
15843  fi
15844  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15845    INCLUDE_SA=false
15846  fi
15847  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15848    INCLUDE_SA=false
15849  fi
15850
15851
15852  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15853    MACOSX_UNIVERSAL="true"
15854  fi
15855
15856
15857
15858
15859  DEBUG_LEVEL="release"
15860  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15861$as_echo_n "checking which debug level to use... " >&6; }
15862  # Check whether --enable-debug was given.
15863if test "${enable_debug+set}" = set; then :
15864  enableval=$enable_debug;
15865        ENABLE_DEBUG="${enableval}"
15866        DEBUG_LEVEL="fastdebug"
15867
15868else
15869  ENABLE_DEBUG="no"
15870fi
15871
15872
15873
15874# Check whether --with-debug-level was given.
15875if test "${with_debug_level+set}" = set; then :
15876  withval=$with_debug_level;
15877        DEBUG_LEVEL="${withval}"
15878        if test "x$ENABLE_DEBUG" = xyes; then
15879          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15880        fi
15881
15882fi
15883
15884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15885$as_echo "$DEBUG_LEVEL" >&6; }
15886
15887  if test "x$DEBUG_LEVEL" != xrelease && \
15888      test "x$DEBUG_LEVEL" != xoptimized && \
15889      test "x$DEBUG_LEVEL" != xfastdebug && \
15890      test "x$DEBUG_LEVEL" != xslowdebug; then
15891    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15892  fi
15893
15894
15895  case $DEBUG_LEVEL in
15896    release )
15897      VARIANT="OPT"
15898      FASTDEBUG="false"
15899      DEBUG_CLASSFILES="false"
15900      BUILD_VARIANT_RELEASE=""
15901      HOTSPOT_DEBUG_LEVEL="product"
15902      HOTSPOT_EXPORT="product"
15903      ;;
15904    fastdebug )
15905      VARIANT="DBG"
15906      FASTDEBUG="true"
15907      DEBUG_CLASSFILES="true"
15908      BUILD_VARIANT_RELEASE="-fastdebug"
15909      HOTSPOT_DEBUG_LEVEL="fastdebug"
15910      HOTSPOT_EXPORT="fastdebug"
15911      ;;
15912    slowdebug )
15913      VARIANT="DBG"
15914      FASTDEBUG="false"
15915      DEBUG_CLASSFILES="true"
15916      BUILD_VARIANT_RELEASE="-debug"
15917      HOTSPOT_DEBUG_LEVEL="debug"
15918      HOTSPOT_EXPORT="debug"
15919      ;;
15920    optimized )
15921      VARIANT="OPT"
15922      FASTDEBUG="false"
15923      DEBUG_CLASSFILES="false"
15924      BUILD_VARIANT_RELEASE="-optimized"
15925      HOTSPOT_DEBUG_LEVEL="optimized"
15926      HOTSPOT_EXPORT="optimized"
15927      ;;
15928  esac
15929
15930  # The debug level 'optimized' is a little special because it is currently only
15931  # applicable to the HotSpot build where it means to build a completely
15932  # optimized version of the VM without any debugging code (like for the
15933  # 'release' debug level which is called 'product' in the HotSpot build) but
15934  # with the exception that it can contain additional code which is otherwise
15935  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15936  # test new and/or experimental features which are not intended for customer
15937  # shipment. Because these new features need to be tested and benchmarked in
15938  # real world scenarios, we want to build the containing JDK at the 'release'
15939  # debug level.
15940  if test "x$DEBUG_LEVEL" = xoptimized; then
15941    DEBUG_LEVEL="release"
15942  fi
15943
15944  #####
15945  # Generate the legacy makefile targets for hotspot.
15946  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15947  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15948  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15949  # But until then ...
15950  HOTSPOT_TARGET=""
15951
15952  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15953    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15954  fi
15955
15956  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15957    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15958  fi
15959
15960  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15961    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15962  fi
15963
15964  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15965    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15966  fi
15967
15968  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15969    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15970  fi
15971
15972  if test "x$JVM_VARIANT_CORE" = xtrue; then
15973    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15974  fi
15975
15976  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15977
15978  # On Macosx universal binaries are produced, but they only contain
15979  # 64 bit intel. This invalidates control of which jvms are built
15980  # from configure, but only server is valid anyway. Fix this
15981  # when hotspot makefiles are rewritten.
15982  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15983    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15984  fi
15985
15986  #####
15987
15988
15989
15990
15991
15992
15993
15994
15995# With basic setup done, call the custom early hook.
15996
15997
15998# Check if we have devkits, extra paths or sysroot set.
15999
16000
16001# Check whether --with-devkit was given.
16002if test "${with_devkit+set}" = set; then :
16003  withval=$with_devkit;
16004
16005  # Only process if variable expands to non-empty
16006
16007  if test "x$with_devkit" != x; then
16008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16009
16010  # Input might be given as Windows format, start by converting to
16011  # unix format.
16012  path="$with_devkit"
16013  new_path=`$CYGPATH -u "$path"`
16014
16015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16018  # "foo.exe" is OK but "foo" is an error.
16019  #
16020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16021  # It is also a way to make sure we got the proper file name for the real test later on.
16022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16023  if test "x$test_shortpath" = x; then
16024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16025$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16026    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16027  fi
16028
16029  # Call helper function which possibly converts this using DOS-style short mode.
16030  # If so, the updated path is stored in $new_path.
16031
16032  input_path="$new_path"
16033  # Check if we need to convert this using DOS-style short mode. If the path
16034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16035  # take no chances and rewrite it.
16036  # Note: m4 eats our [], so we need to use [ and ] instead.
16037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16038  if test "x$has_forbidden_chars" != x; then
16039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16043      # Going to short mode and back again did indeed matter. Since short mode is
16044      # case insensitive, let's make it lowercase to improve readability.
16045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16046      # Now convert it back to Unix-style (cygpath)
16047      input_path=`$CYGPATH -u "$shortmode_path"`
16048      new_path="$input_path"
16049    fi
16050  fi
16051
16052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16053  if test "x$test_cygdrive_prefix" = x; then
16054    # As a simple fix, exclude /usr/bin since it's not a real path.
16055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16057      # a path prefixed by /cygdrive for fixpath to work.
16058      new_path="$CYGWIN_ROOT_PATH$input_path"
16059    fi
16060  fi
16061
16062
16063  if test "x$path" != "x$new_path"; then
16064    with_devkit="$new_path"
16065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16066$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16067  fi
16068
16069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16070
16071  path="$with_devkit"
16072  has_colon=`$ECHO $path | $GREP ^.:`
16073  new_path="$path"
16074  if test "x$has_colon" = x; then
16075    # Not in mixed or Windows style, start by that.
16076    new_path=`cmd //c echo $path`
16077  fi
16078
16079
16080  input_path="$new_path"
16081  # Check if we need to convert this using DOS-style short mode. If the path
16082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16083  # take no chances and rewrite it.
16084  # Note: m4 eats our [], so we need to use [ and ] instead.
16085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16086  if test "x$has_forbidden_chars" != x; then
16087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16089  fi
16090
16091
16092  windows_path="$new_path"
16093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16094    unix_path=`$CYGPATH -u "$windows_path"`
16095    new_path="$unix_path"
16096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16098    new_path="$unix_path"
16099  fi
16100
16101  if test "x$path" != "x$new_path"; then
16102    with_devkit="$new_path"
16103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16104$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16105  fi
16106
16107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16109
16110    else
16111      # We're on a unix platform. Hooray! :)
16112      path="$with_devkit"
16113      has_space=`$ECHO "$path" | $GREP " "`
16114      if test "x$has_space" != x; then
16115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16116$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16118      fi
16119
16120      # Use eval to expand a potential ~
16121      eval path="$path"
16122      if test ! -f "$path" && test ! -d "$path"; then
16123        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16124      fi
16125
16126      if test -d "$path"; then
16127        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16128      else
16129        dir="`$DIRNAME "$path"`"
16130        base="`$BASENAME "$path"`"
16131        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16132      fi
16133    fi
16134  fi
16135
16136        DEVKIT_ROOT="$with_devkit"
16137        # Check for a meta data info file in the root of the devkit
16138        if test -f "$DEVKIT_ROOT/devkit.info"; then
16139          . $DEVKIT_ROOT/devkit.info
16140          # This potentially sets the following:
16141          # A descriptive name of the devkit
16142
16143  if test "x$DEVKIT_NAME" = x; then
16144    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16145  fi
16146
16147          # Corresponds to --with-extra-path
16148
16149  if test "x$DEVKIT_EXTRA_PATH" = x; then
16150    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16151  fi
16152
16153          # Corresponds to --with-toolchain-path
16154
16155  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16156    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16157  fi
16158
16159          # Corresponds to --with-sysroot
16160
16161  if test "x$DEVKIT_SYSROOT" = x; then
16162    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16163  fi
16164
16165
16166          # Identifies the Visual Studio version in the devkit
16167
16168  if test "x$DEVKIT_VS_VERSION" = x; then
16169    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16170  fi
16171
16172          # The Visual Studio include environment variable
16173
16174  if test "x$DEVKIT_VS_INCLUDE" = x; then
16175    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16176  fi
16177
16178          # The Visual Studio lib environment variable
16179
16180  if test "x$DEVKIT_VS_LIB" = x; then
16181    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16182  fi
16183
16184          # Corresponds to --with-msvcr-dll
16185
16186  if test "x$DEVKIT_MSVCR_DLL" = x; then
16187    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16188  fi
16189
16190          # Corresponds to --with-msvcp-dll
16191
16192  if test "x$DEVKIT_MSVCP_DLL" = x; then
16193    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16194  fi
16195
16196        fi
16197
16198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16199$as_echo_n "checking for devkit... " >&6; }
16200        if test "x$DEVKIT_NAME" != x; then
16201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16202$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16203        else
16204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16205$as_echo "$DEVKIT_ROOT" >&6; }
16206        fi
16207
16208
16209  if test "x$DEVKIT_EXTRA_PATH" != x; then
16210    if test "x$EXTRA_PATH" = x; then
16211      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16212    else
16213      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16214    fi
16215  fi
16216
16217
16218        # Fallback default of just /bin if DEVKIT_PATH is not defined
16219        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16220          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16221        fi
16222
16223  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16224    if test "x$TOOLCHAIN_PATH" = x; then
16225      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16226    else
16227      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16228    fi
16229  fi
16230
16231
16232        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16233        # places for backwards compatiblity.
16234        if test "x$DEVKIT_SYSROOT" != x; then
16235          SYSROOT="$DEVKIT_SYSROOT"
16236        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16237          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16238        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16239          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16240        fi
16241
16242
16243fi
16244
16245
16246  # You can force the sysroot if the sysroot encoded into the compiler tools
16247  # is not correct.
16248
16249# Check whether --with-sys-root was given.
16250if test "${with_sys_root+set}" = set; then :
16251  withval=$with_sys_root; SYSROOT=$with_sys_root
16252
16253fi
16254
16255
16256
16257# Check whether --with-sysroot was given.
16258if test "${with_sysroot+set}" = set; then :
16259  withval=$with_sysroot; SYSROOT=$with_sysroot
16260
16261fi
16262
16263
16264
16265# Check whether --with-tools-dir was given.
16266if test "${with_tools_dir+set}" = set; then :
16267  withval=$with_tools_dir;
16268  if test "x$with_tools_dir" != x; then
16269    if test "x$TOOLCHAIN_PATH" = x; then
16270      TOOLCHAIN_PATH="$with_tools_dir"
16271    else
16272      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16273    fi
16274  fi
16275
16276
16277fi
16278
16279
16280
16281# Check whether --with-toolchain-path was given.
16282if test "${with_toolchain_path+set}" = set; then :
16283  withval=$with_toolchain_path;
16284  if test "x$with_toolchain_path" != x; then
16285    if test "x$TOOLCHAIN_PATH" = x; then
16286      TOOLCHAIN_PATH="$with_toolchain_path"
16287    else
16288      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16289    fi
16290  fi
16291
16292
16293fi
16294
16295
16296
16297# Check whether --with-extra-path was given.
16298if test "${with_extra_path+set}" = set; then :
16299  withval=$with_extra_path;
16300  if test "x$with_extra_path" != x; then
16301    if test "x$EXTRA_PATH" = x; then
16302      EXTRA_PATH="$with_extra_path"
16303    else
16304      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16305    fi
16306  fi
16307
16308
16309fi
16310
16311
16312  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16313    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16314    # If not, detect if Xcode is installed by running xcodebuild -version
16315    # if no Xcode installed, xcodebuild exits with 1
16316    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16317    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16318      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16319      # fall back on the stub binary in /usr/bin/xcodebuild
16320      # Extract the first word of "xcodebuild", so it can be a program name with args.
16321set dummy xcodebuild; ac_word=$2
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16323$as_echo_n "checking for $ac_word... " >&6; }
16324if ${ac_cv_path_XCODEBUILD+:} false; then :
16325  $as_echo_n "(cached) " >&6
16326else
16327  case $XCODEBUILD in
16328  [\\/]* | ?:[\\/]*)
16329  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16330  ;;
16331  *)
16332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16333for as_dir in $TOOLCHAIN_PATH
16334do
16335  IFS=$as_save_IFS
16336  test -z "$as_dir" && as_dir=.
16337    for ac_exec_ext in '' $ac_executable_extensions; do
16338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16339    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16341    break 2
16342  fi
16343done
16344  done
16345IFS=$as_save_IFS
16346
16347  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16348  ;;
16349esac
16350fi
16351XCODEBUILD=$ac_cv_path_XCODEBUILD
16352if test -n "$XCODEBUILD"; then
16353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16354$as_echo "$XCODEBUILD" >&6; }
16355else
16356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16357$as_echo "no" >&6; }
16358fi
16359
16360
16361    else
16362      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16363      # when only the command line tools are installed there are no SDKs, so headers
16364      # are copied into the system frameworks
16365      XCODEBUILD=
16366
16367    fi
16368
16369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16370$as_echo_n "checking for sdk name... " >&6; }
16371
16372# Check whether --with-sdk-name was given.
16373if test "${with_sdk_name+set}" = set; then :
16374  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16375
16376fi
16377
16378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16379$as_echo "$SDKNAME" >&6; }
16380
16381    # if toolchain path is specified then don't rely on system headers, they may not compile
16382    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16383    test -z "$TOOLCHAIN_PATH" && \
16384      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16385
16386    if test -z "$SYSROOT"; then
16387      if test -n "$XCODEBUILD"; then
16388        # if we don't have system headers, use default SDK name (last resort)
16389        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16390          SDKNAME=${SDKNAME:-macosx}
16391        fi
16392
16393        if test -n "$SDKNAME"; then
16394          # Call xcodebuild to determine SYSROOT
16395          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16396        fi
16397      else
16398        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16399          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
16400        fi
16401      fi
16402    else
16403      # warn user if --with-sdk-name was also set
16404      if test -n "$with_sdk_name"; then
16405        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16406$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16407      fi
16408    fi
16409
16410    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16411      # If no system framework headers, then SYSROOT must be set, or we won't build
16412      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
16413    fi
16414
16415    # Perform a basic sanity test
16416    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16417      if test -z "$SYSROOT"; then
16418        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
16419      else
16420        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16421      fi
16422    fi
16423
16424    # set SDKROOT too, Xcode tools will pick it up
16425    SDKROOT=$SYSROOT
16426
16427  fi
16428
16429  # Prepend the extra path to the global path
16430
16431  if test "x$EXTRA_PATH" != x; then
16432    if test "x$PATH" = x; then
16433      PATH="$EXTRA_PATH"
16434    else
16435      PATH="$EXTRA_PATH:$PATH"
16436    fi
16437  fi
16438
16439
16440  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16441    # Add extra search paths on solaris for utilities like ar and as etc...
16442    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16443  fi
16444
16445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16446$as_echo_n "checking for sysroot... " >&6; }
16447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16448$as_echo "$SYSROOT" >&6; }
16449  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16450$as_echo_n "checking for toolchain path... " >&6; }
16451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16452$as_echo "$TOOLCHAIN_PATH" >&6; }
16453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16454$as_echo_n "checking for extra path... " >&6; }
16455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16456$as_echo "$EXTRA_PATH" >&6; }
16457
16458
16459# To properly create a configuration name, we need to have the OpenJDK target
16460# and options (variants and debug level) parsed.
16461
16462
16463
16464# Check whether --with-conf-name was given.
16465if test "${with_conf_name+set}" = set; then :
16466  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16467fi
16468
16469
16470  # Test from where we are running configure, in or outside of src root.
16471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16472$as_echo_n "checking where to store configuration... " >&6; }
16473  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16474      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16475      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16476    # We are running configure from the src root.
16477    # Create a default ./build/target-variant-debuglevel output root.
16478    if test "x${CONF_NAME}" = x; then
16479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16480$as_echo "in default location" >&6; }
16481      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16482    else
16483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16484$as_echo "in build directory with custom name" >&6; }
16485    fi
16486    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16487    $MKDIR -p "$OUTPUT_ROOT"
16488    if test ! -d "$OUTPUT_ROOT"; then
16489      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16490    fi
16491  else
16492    # We are running configure from outside of the src dir.
16493    # Then use the current directory as output dir!
16494    # If configuration is situated in normal build directory, just use the build
16495    # directory name as configuration name, otherwise use the complete path.
16496    if test "x${CONF_NAME}" = x; then
16497      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16498    fi
16499    OUTPUT_ROOT="$CURDIR"
16500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16501$as_echo "in current directory" >&6; }
16502
16503    # WARNING: This might be a bad thing to do. You need to be sure you want to
16504    # have a configuration in this directory. Do some sanity checks!
16505
16506    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16507      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16508      # other files
16509      files_present=`$LS $OUTPUT_ROOT`
16510      # Configure has already touched config.log and confdefs.h in the current dir when this check
16511      # is performed.
16512      filtered_files=`$ECHO "$files_present" \
16513          | $SED -e 's/config.log//g' \
16514              -e 's/configure.log//g' \
16515              -e 's/confdefs.h//g' \
16516              -e 's/ //g' \
16517          | $TR -d '\n'`
16518      if test "x$filtered_files" != x; then
16519        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16520$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16521        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16522$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16523        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16524$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16525        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16526$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16527        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16528$as_echo "$as_me: seriously mess up just about everything." >&6;}
16529        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16530$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16531        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16532$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16533        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16534      fi
16535    fi
16536  fi
16537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16538$as_echo_n "checking what configuration name to use... " >&6; }
16539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16540$as_echo "$CONF_NAME" >&6; }
16541
16542
16543  # Only process if variable expands to non-empty
16544
16545  if test "x$OUTPUT_ROOT" != x; then
16546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16547
16548  # Input might be given as Windows format, start by converting to
16549  # unix format.
16550  path="$OUTPUT_ROOT"
16551  new_path=`$CYGPATH -u "$path"`
16552
16553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16556  # "foo.exe" is OK but "foo" is an error.
16557  #
16558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16559  # It is also a way to make sure we got the proper file name for the real test later on.
16560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16561  if test "x$test_shortpath" = x; then
16562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16563$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16564    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16565  fi
16566
16567  # Call helper function which possibly converts this using DOS-style short mode.
16568  # If so, the updated path is stored in $new_path.
16569
16570  input_path="$new_path"
16571  # Check if we need to convert this using DOS-style short mode. If the path
16572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16573  # take no chances and rewrite it.
16574  # Note: m4 eats our [], so we need to use [ and ] instead.
16575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16576  if test "x$has_forbidden_chars" != x; then
16577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16581      # Going to short mode and back again did indeed matter. Since short mode is
16582      # case insensitive, let's make it lowercase to improve readability.
16583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16584      # Now convert it back to Unix-style (cygpath)
16585      input_path=`$CYGPATH -u "$shortmode_path"`
16586      new_path="$input_path"
16587    fi
16588  fi
16589
16590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16591  if test "x$test_cygdrive_prefix" = x; then
16592    # As a simple fix, exclude /usr/bin since it's not a real path.
16593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16595      # a path prefixed by /cygdrive for fixpath to work.
16596      new_path="$CYGWIN_ROOT_PATH$input_path"
16597    fi
16598  fi
16599
16600
16601  if test "x$path" != "x$new_path"; then
16602    OUTPUT_ROOT="$new_path"
16603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16604$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16605  fi
16606
16607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16608
16609  path="$OUTPUT_ROOT"
16610  has_colon=`$ECHO $path | $GREP ^.:`
16611  new_path="$path"
16612  if test "x$has_colon" = x; then
16613    # Not in mixed or Windows style, start by that.
16614    new_path=`cmd //c echo $path`
16615  fi
16616
16617
16618  input_path="$new_path"
16619  # Check if we need to convert this using DOS-style short mode. If the path
16620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16621  # take no chances and rewrite it.
16622  # Note: m4 eats our [], so we need to use [ and ] instead.
16623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16624  if test "x$has_forbidden_chars" != x; then
16625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16627  fi
16628
16629
16630  windows_path="$new_path"
16631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16632    unix_path=`$CYGPATH -u "$windows_path"`
16633    new_path="$unix_path"
16634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16636    new_path="$unix_path"
16637  fi
16638
16639  if test "x$path" != "x$new_path"; then
16640    OUTPUT_ROOT="$new_path"
16641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16642$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16643  fi
16644
16645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16647
16648    else
16649      # We're on a unix platform. Hooray! :)
16650      path="$OUTPUT_ROOT"
16651      has_space=`$ECHO "$path" | $GREP " "`
16652      if test "x$has_space" != x; then
16653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16654$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16656      fi
16657
16658      # Use eval to expand a potential ~
16659      eval path="$path"
16660      if test ! -f "$path" && test ! -d "$path"; then
16661        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16662      fi
16663
16664      if test -d "$path"; then
16665        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16666      else
16667        dir="`$DIRNAME "$path"`"
16668        base="`$BASENAME "$path"`"
16669        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16670      fi
16671    fi
16672  fi
16673
16674
16675  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16676  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16677
16678  SPEC=$OUTPUT_ROOT/spec.gmk
16679
16680  CONF_NAME=$CONF_NAME
16681
16682  OUTPUT_ROOT=$OUTPUT_ROOT
16683
16684
16685
16686  # The spec.gmk file contains all variables for the make system.
16687  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16688
16689  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16690  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16691
16692  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16693  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16694
16695  # The compare.sh is used to compare the build output to other builds.
16696  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16697
16698  # The generated Makefile knows where the spec.gmk is and where the source is.
16699  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16700  # which will look for generated configurations
16701  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16702
16703
16704
16705# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16706
16707  for ac_prog in apt-get yum port pkgutil pkgadd
16708do
16709  # Extract the first word of "$ac_prog", so it can be a program name with args.
16710set dummy $ac_prog; ac_word=$2
16711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16712$as_echo_n "checking for $ac_word... " >&6; }
16713if ${ac_cv_prog_PKGHANDLER+:} false; then :
16714  $as_echo_n "(cached) " >&6
16715else
16716  if test -n "$PKGHANDLER"; then
16717  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16718else
16719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16720for as_dir in $PATH
16721do
16722  IFS=$as_save_IFS
16723  test -z "$as_dir" && as_dir=.
16724    for ac_exec_ext in '' $ac_executable_extensions; do
16725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16726    ac_cv_prog_PKGHANDLER="$ac_prog"
16727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16728    break 2
16729  fi
16730done
16731  done
16732IFS=$as_save_IFS
16733
16734fi
16735fi
16736PKGHANDLER=$ac_cv_prog_PKGHANDLER
16737if test -n "$PKGHANDLER"; then
16738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16739$as_echo "$PKGHANDLER" >&6; }
16740else
16741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16742$as_echo "no" >&6; }
16743fi
16744
16745
16746  test -n "$PKGHANDLER" && break
16747done
16748
16749
16750
16751# Setup tools that requires more complex handling, or that is not needed by the configure script.
16752
16753
16754
16755  # Publish this variable in the help.
16756
16757
16758  if [ -z "${MAKE+x}" ]; then
16759    # The variable is not set by user, try to locate tool using the code snippet
16760
16761    # Try our hardest to locate a correct version of GNU make
16762    for ac_prog in gmake
16763do
16764  # Extract the first word of "$ac_prog", so it can be a program name with args.
16765set dummy $ac_prog; ac_word=$2
16766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16767$as_echo_n "checking for $ac_word... " >&6; }
16768if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16769  $as_echo_n "(cached) " >&6
16770else
16771  case $CHECK_GMAKE in
16772  [\\/]* | ?:[\\/]*)
16773  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16774  ;;
16775  *)
16776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16777for as_dir in $PATH
16778do
16779  IFS=$as_save_IFS
16780  test -z "$as_dir" && as_dir=.
16781    for ac_exec_ext in '' $ac_executable_extensions; do
16782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16783    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16785    break 2
16786  fi
16787done
16788  done
16789IFS=$as_save_IFS
16790
16791  ;;
16792esac
16793fi
16794CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16795if test -n "$CHECK_GMAKE"; then
16796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16797$as_echo "$CHECK_GMAKE" >&6; }
16798else
16799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16800$as_echo "no" >&6; }
16801fi
16802
16803
16804  test -n "$CHECK_GMAKE" && break
16805done
16806
16807
16808  MAKE_CANDIDATE=""$CHECK_GMAKE""
16809  DESCRIPTION="gmake in PATH"
16810
16811  # On Cygwin, we require a newer version of make than on other platforms
16812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16813    MAKE_VERSION_EXPR="-e 4\."
16814    MAKE_REQUIRED_VERSION="4.0"
16815   else
16816    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16817    MAKE_REQUIRED_VERSION="3.81"
16818  fi
16819
16820  if test "x$MAKE_CANDIDATE" != x; then
16821    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16822$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16823    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16824    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16825    if test "x$IS_GNU_MAKE" = x; then
16826      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16827$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16828    else
16829      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16830      if test "x$IS_MODERN_MAKE" = x; then
16831        { $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
16832$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;}
16833      else
16834        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16835          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16836            MAKE_EXPECTED_ENV='cygwin'
16837          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16838            MAKE_EXPECTED_ENV='msys'
16839          else
16840            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16841          fi
16842          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16843          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16844        else
16845          # Not relevant for non-Windows
16846          IS_MAKE_CORRECT_ENV=true
16847        fi
16848        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16849          { $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
16850$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;}
16851        else
16852          FOUND_MAKE=$MAKE_CANDIDATE
16853
16854  # Only process if variable expands to non-empty
16855
16856  if test "x$FOUND_MAKE" != x; then
16857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16858
16859  # First separate the path from the arguments. This will split at the first
16860  # space.
16861  complete="$FOUND_MAKE"
16862  path="${complete%% *}"
16863  tmp="$complete EOL"
16864  arguments="${tmp#* }"
16865
16866  # Input might be given as Windows format, start by converting to
16867  # unix format.
16868  new_path=`$CYGPATH -u "$path"`
16869
16870  # Now try to locate executable using which
16871  new_path=`$WHICH "$new_path" 2> /dev/null`
16872  # bat and cmd files are not always considered executable in cygwin causing which
16873  # to not find them
16874  if test "x$new_path" = x \
16875      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16876      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16877    new_path=`$CYGPATH -u "$path"`
16878  fi
16879  if test "x$new_path" = x; then
16880    # Oops. Which didn't find the executable.
16881    # The splitting of arguments from the executable at a space might have been incorrect,
16882    # since paths with space are more likely in Windows. Give it another try with the whole
16883    # argument.
16884    path="$complete"
16885    arguments="EOL"
16886    new_path=`$CYGPATH -u "$path"`
16887    new_path=`$WHICH "$new_path" 2> /dev/null`
16888    # bat and cmd files are not always considered executable in cygwin causing which
16889    # to not find them
16890    if test "x$new_path" = x \
16891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16893      new_path=`$CYGPATH -u "$path"`
16894    fi
16895    if test "x$new_path" = x; then
16896      # It's still not found. Now this is an unrecoverable error.
16897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16898$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16899      has_space=`$ECHO "$complete" | $GREP " "`
16900      if test "x$has_space" != x; then
16901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16903      fi
16904      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16905    fi
16906  fi
16907
16908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16911  # "foo.exe" is OK but "foo" is an error.
16912  #
16913  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16914  # It is also a way to make sure we got the proper file name for the real test later on.
16915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16916  if test "x$test_shortpath" = x; then
16917    # Short path failed, file does not exist as specified.
16918    # Try adding .exe or .cmd
16919    if test -f "${new_path}.exe"; then
16920      input_to_shortpath="${new_path}.exe"
16921    elif test -f "${new_path}.cmd"; then
16922      input_to_shortpath="${new_path}.cmd"
16923    else
16924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16925$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16926      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16927$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16928      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16929    fi
16930  else
16931    input_to_shortpath="$new_path"
16932  fi
16933
16934  # Call helper function which possibly converts this using DOS-style short mode.
16935  # If so, the updated path is stored in $new_path.
16936  new_path="$input_to_shortpath"
16937
16938  input_path="$input_to_shortpath"
16939  # Check if we need to convert this using DOS-style short mode. If the path
16940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16941  # take no chances and rewrite it.
16942  # Note: m4 eats our [], so we need to use [ and ] instead.
16943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16944  if test "x$has_forbidden_chars" != x; then
16945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16949      # Going to short mode and back again did indeed matter. Since short mode is
16950      # case insensitive, let's make it lowercase to improve readability.
16951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16952      # Now convert it back to Unix-style (cygpath)
16953      input_path=`$CYGPATH -u "$shortmode_path"`
16954      new_path="$input_path"
16955    fi
16956  fi
16957
16958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16959  if test "x$test_cygdrive_prefix" = x; then
16960    # As a simple fix, exclude /usr/bin since it's not a real path.
16961    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16963      # a path prefixed by /cygdrive for fixpath to work.
16964      new_path="$CYGWIN_ROOT_PATH$input_path"
16965    fi
16966  fi
16967
16968  # remove trailing .exe if any
16969  new_path="${new_path/%.exe/}"
16970
16971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972
16973  # First separate the path from the arguments. This will split at the first
16974  # space.
16975  complete="$FOUND_MAKE"
16976  path="${complete%% *}"
16977  tmp="$complete EOL"
16978  arguments="${tmp#* }"
16979
16980  # Input might be given as Windows format, start by converting to
16981  # unix format.
16982  new_path="$path"
16983
16984  windows_path="$new_path"
16985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16986    unix_path=`$CYGPATH -u "$windows_path"`
16987    new_path="$unix_path"
16988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16990    new_path="$unix_path"
16991  fi
16992
16993
16994  # Now try to locate executable using which
16995  new_path=`$WHICH "$new_path" 2> /dev/null`
16996
16997  if test "x$new_path" = x; then
16998    # Oops. Which didn't find the executable.
16999    # The splitting of arguments from the executable at a space might have been incorrect,
17000    # since paths with space are more likely in Windows. Give it another try with the whole
17001    # argument.
17002    path="$complete"
17003    arguments="EOL"
17004    new_path="$path"
17005
17006  windows_path="$new_path"
17007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17008    unix_path=`$CYGPATH -u "$windows_path"`
17009    new_path="$unix_path"
17010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17012    new_path="$unix_path"
17013  fi
17014
17015
17016    new_path=`$WHICH "$new_path" 2> /dev/null`
17017    # bat and cmd files are not always considered executable in MSYS causing which
17018    # to not find them
17019    if test "x$new_path" = x \
17020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17022      new_path="$path"
17023
17024  windows_path="$new_path"
17025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17026    unix_path=`$CYGPATH -u "$windows_path"`
17027    new_path="$unix_path"
17028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17030    new_path="$unix_path"
17031  fi
17032
17033    fi
17034
17035    if test "x$new_path" = x; then
17036      # It's still not found. Now this is an unrecoverable error.
17037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17038$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17039      has_space=`$ECHO "$complete" | $GREP " "`
17040      if test "x$has_space" != x; then
17041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17043      fi
17044      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17045    fi
17046  fi
17047
17048  # Now new_path has a complete unix path to the binary
17049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17050    # Keep paths in /bin as-is, but remove trailing .exe if any
17051    new_path="${new_path/%.exe/}"
17052    # Do not save /bin paths to all_fixpath_prefixes!
17053  else
17054    # Not in mixed or Windows style, start by that.
17055    new_path=`cmd //c echo $new_path`
17056
17057  input_path="$new_path"
17058  # Check if we need to convert this using DOS-style short mode. If the path
17059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17060  # take no chances and rewrite it.
17061  # Note: m4 eats our [], so we need to use [ and ] instead.
17062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17063  if test "x$has_forbidden_chars" != x; then
17064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17066  fi
17067
17068    # Output is in $new_path
17069
17070  windows_path="$new_path"
17071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17072    unix_path=`$CYGPATH -u "$windows_path"`
17073    new_path="$unix_path"
17074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17076    new_path="$unix_path"
17077  fi
17078
17079    # remove trailing .exe if any
17080    new_path="${new_path/%.exe/}"
17081
17082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17084  fi
17085
17086    else
17087      # We're on a unix platform. Hooray! :)
17088      # First separate the path from the arguments. This will split at the first
17089      # space.
17090      complete="$FOUND_MAKE"
17091      path="${complete%% *}"
17092      tmp="$complete EOL"
17093      arguments="${tmp#* }"
17094
17095      # Cannot rely on the command "which" here since it doesn't always work.
17096      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17097      if test -z "$is_absolute_path"; then
17098        # Path to executable is not absolute. Find it.
17099        IFS_save="$IFS"
17100        IFS=:
17101        for p in $PATH; do
17102          if test -f "$p/$path" && test -x "$p/$path"; then
17103            new_path="$p/$path"
17104            break
17105          fi
17106        done
17107        IFS="$IFS_save"
17108      else
17109        # This is an absolute path, we can use it without further modifications.
17110        new_path="$path"
17111      fi
17112
17113      if test "x$new_path" = x; then
17114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17115$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17116        has_space=`$ECHO "$complete" | $GREP " "`
17117        if test "x$has_space" != x; then
17118          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17119$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17120        fi
17121        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17122      fi
17123    fi
17124
17125    # Now join together the path and the arguments once again
17126    if test "x$arguments" != xEOL; then
17127      new_complete="$new_path ${arguments% *}"
17128    else
17129      new_complete="$new_path"
17130    fi
17131
17132    if test "x$complete" != "x$new_complete"; then
17133      FOUND_MAKE="$new_complete"
17134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17135$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17136    fi
17137  fi
17138
17139        fi
17140      fi
17141    fi
17142  fi
17143
17144
17145    if test "x$FOUND_MAKE" = x; then
17146      for ac_prog in make
17147do
17148  # Extract the first word of "$ac_prog", so it can be a program name with args.
17149set dummy $ac_prog; ac_word=$2
17150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17151$as_echo_n "checking for $ac_word... " >&6; }
17152if ${ac_cv_path_CHECK_MAKE+:} false; then :
17153  $as_echo_n "(cached) " >&6
17154else
17155  case $CHECK_MAKE in
17156  [\\/]* | ?:[\\/]*)
17157  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17158  ;;
17159  *)
17160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17161for as_dir in $PATH
17162do
17163  IFS=$as_save_IFS
17164  test -z "$as_dir" && as_dir=.
17165    for ac_exec_ext in '' $ac_executable_extensions; do
17166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17167    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17169    break 2
17170  fi
17171done
17172  done
17173IFS=$as_save_IFS
17174
17175  ;;
17176esac
17177fi
17178CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17179if test -n "$CHECK_MAKE"; then
17180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17181$as_echo "$CHECK_MAKE" >&6; }
17182else
17183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17184$as_echo "no" >&6; }
17185fi
17186
17187
17188  test -n "$CHECK_MAKE" && break
17189done
17190
17191
17192  MAKE_CANDIDATE=""$CHECK_MAKE""
17193  DESCRIPTION="make in PATH"
17194
17195  # On Cygwin, we require a newer version of make than on other platforms
17196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17197    MAKE_VERSION_EXPR="-e 4\."
17198    MAKE_REQUIRED_VERSION="4.0"
17199   else
17200    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17201    MAKE_REQUIRED_VERSION="3.81"
17202  fi
17203
17204  if test "x$MAKE_CANDIDATE" != x; then
17205    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17206$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17207    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17208    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17209    if test "x$IS_GNU_MAKE" = x; then
17210      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17211$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17212    else
17213      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17214      if test "x$IS_MODERN_MAKE" = x; then
17215        { $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
17216$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;}
17217      else
17218        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17219          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17220            MAKE_EXPECTED_ENV='cygwin'
17221          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17222            MAKE_EXPECTED_ENV='msys'
17223          else
17224            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17225          fi
17226          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17227          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17228        else
17229          # Not relevant for non-Windows
17230          IS_MAKE_CORRECT_ENV=true
17231        fi
17232        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17233          { $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
17234$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;}
17235        else
17236          FOUND_MAKE=$MAKE_CANDIDATE
17237
17238  # Only process if variable expands to non-empty
17239
17240  if test "x$FOUND_MAKE" != x; then
17241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17242
17243  # First separate the path from the arguments. This will split at the first
17244  # space.
17245  complete="$FOUND_MAKE"
17246  path="${complete%% *}"
17247  tmp="$complete EOL"
17248  arguments="${tmp#* }"
17249
17250  # Input might be given as Windows format, start by converting to
17251  # unix format.
17252  new_path=`$CYGPATH -u "$path"`
17253
17254  # Now try to locate executable using which
17255  new_path=`$WHICH "$new_path" 2> /dev/null`
17256  # bat and cmd files are not always considered executable in cygwin causing which
17257  # to not find them
17258  if test "x$new_path" = x \
17259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17261    new_path=`$CYGPATH -u "$path"`
17262  fi
17263  if test "x$new_path" = x; then
17264    # Oops. Which didn't find the executable.
17265    # The splitting of arguments from the executable at a space might have been incorrect,
17266    # since paths with space are more likely in Windows. Give it another try with the whole
17267    # argument.
17268    path="$complete"
17269    arguments="EOL"
17270    new_path=`$CYGPATH -u "$path"`
17271    new_path=`$WHICH "$new_path" 2> /dev/null`
17272    # bat and cmd files are not always considered executable in cygwin causing which
17273    # to not find them
17274    if test "x$new_path" = x \
17275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17277      new_path=`$CYGPATH -u "$path"`
17278    fi
17279    if test "x$new_path" = x; then
17280      # It's still not found. Now this is an unrecoverable error.
17281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17282$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17283      has_space=`$ECHO "$complete" | $GREP " "`
17284      if test "x$has_space" != x; then
17285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17287      fi
17288      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17289    fi
17290  fi
17291
17292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17295  # "foo.exe" is OK but "foo" is an error.
17296  #
17297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17298  # It is also a way to make sure we got the proper file name for the real test later on.
17299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17300  if test "x$test_shortpath" = x; then
17301    # Short path failed, file does not exist as specified.
17302    # Try adding .exe or .cmd
17303    if test -f "${new_path}.exe"; then
17304      input_to_shortpath="${new_path}.exe"
17305    elif test -f "${new_path}.cmd"; then
17306      input_to_shortpath="${new_path}.cmd"
17307    else
17308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17309$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17312      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17313    fi
17314  else
17315    input_to_shortpath="$new_path"
17316  fi
17317
17318  # Call helper function which possibly converts this using DOS-style short mode.
17319  # If so, the updated path is stored in $new_path.
17320  new_path="$input_to_shortpath"
17321
17322  input_path="$input_to_shortpath"
17323  # Check if we need to convert this using DOS-style short mode. If the path
17324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17325  # take no chances and rewrite it.
17326  # Note: m4 eats our [], so we need to use [ and ] instead.
17327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17328  if test "x$has_forbidden_chars" != x; then
17329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17333      # Going to short mode and back again did indeed matter. Since short mode is
17334      # case insensitive, let's make it lowercase to improve readability.
17335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17336      # Now convert it back to Unix-style (cygpath)
17337      input_path=`$CYGPATH -u "$shortmode_path"`
17338      new_path="$input_path"
17339    fi
17340  fi
17341
17342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17343  if test "x$test_cygdrive_prefix" = x; then
17344    # As a simple fix, exclude /usr/bin since it's not a real path.
17345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17347      # a path prefixed by /cygdrive for fixpath to work.
17348      new_path="$CYGWIN_ROOT_PATH$input_path"
17349    fi
17350  fi
17351
17352  # remove trailing .exe if any
17353  new_path="${new_path/%.exe/}"
17354
17355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17356
17357  # First separate the path from the arguments. This will split at the first
17358  # space.
17359  complete="$FOUND_MAKE"
17360  path="${complete%% *}"
17361  tmp="$complete EOL"
17362  arguments="${tmp#* }"
17363
17364  # Input might be given as Windows format, start by converting to
17365  # unix format.
17366  new_path="$path"
17367
17368  windows_path="$new_path"
17369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17370    unix_path=`$CYGPATH -u "$windows_path"`
17371    new_path="$unix_path"
17372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17374    new_path="$unix_path"
17375  fi
17376
17377
17378  # Now try to locate executable using which
17379  new_path=`$WHICH "$new_path" 2> /dev/null`
17380
17381  if test "x$new_path" = x; then
17382    # Oops. Which didn't find the executable.
17383    # The splitting of arguments from the executable at a space might have been incorrect,
17384    # since paths with space are more likely in Windows. Give it another try with the whole
17385    # argument.
17386    path="$complete"
17387    arguments="EOL"
17388    new_path="$path"
17389
17390  windows_path="$new_path"
17391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17392    unix_path=`$CYGPATH -u "$windows_path"`
17393    new_path="$unix_path"
17394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17396    new_path="$unix_path"
17397  fi
17398
17399
17400    new_path=`$WHICH "$new_path" 2> /dev/null`
17401    # bat and cmd files are not always considered executable in MSYS causing which
17402    # to not find them
17403    if test "x$new_path" = x \
17404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17406      new_path="$path"
17407
17408  windows_path="$new_path"
17409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17410    unix_path=`$CYGPATH -u "$windows_path"`
17411    new_path="$unix_path"
17412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17414    new_path="$unix_path"
17415  fi
17416
17417    fi
17418
17419    if test "x$new_path" = x; then
17420      # It's still not found. Now this is an unrecoverable error.
17421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17422$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17423      has_space=`$ECHO "$complete" | $GREP " "`
17424      if test "x$has_space" != x; then
17425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17427      fi
17428      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17429    fi
17430  fi
17431
17432  # Now new_path has a complete unix path to the binary
17433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17434    # Keep paths in /bin as-is, but remove trailing .exe if any
17435    new_path="${new_path/%.exe/}"
17436    # Do not save /bin paths to all_fixpath_prefixes!
17437  else
17438    # Not in mixed or Windows style, start by that.
17439    new_path=`cmd //c echo $new_path`
17440
17441  input_path="$new_path"
17442  # Check if we need to convert this using DOS-style short mode. If the path
17443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17444  # take no chances and rewrite it.
17445  # Note: m4 eats our [], so we need to use [ and ] instead.
17446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17447  if test "x$has_forbidden_chars" != x; then
17448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17450  fi
17451
17452    # Output is in $new_path
17453
17454  windows_path="$new_path"
17455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17456    unix_path=`$CYGPATH -u "$windows_path"`
17457    new_path="$unix_path"
17458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17460    new_path="$unix_path"
17461  fi
17462
17463    # remove trailing .exe if any
17464    new_path="${new_path/%.exe/}"
17465
17466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17468  fi
17469
17470    else
17471      # We're on a unix platform. Hooray! :)
17472      # First separate the path from the arguments. This will split at the first
17473      # space.
17474      complete="$FOUND_MAKE"
17475      path="${complete%% *}"
17476      tmp="$complete EOL"
17477      arguments="${tmp#* }"
17478
17479      # Cannot rely on the command "which" here since it doesn't always work.
17480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17481      if test -z "$is_absolute_path"; then
17482        # Path to executable is not absolute. Find it.
17483        IFS_save="$IFS"
17484        IFS=:
17485        for p in $PATH; do
17486          if test -f "$p/$path" && test -x "$p/$path"; then
17487            new_path="$p/$path"
17488            break
17489          fi
17490        done
17491        IFS="$IFS_save"
17492      else
17493        # This is an absolute path, we can use it without further modifications.
17494        new_path="$path"
17495      fi
17496
17497      if test "x$new_path" = x; then
17498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17499$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17500        has_space=`$ECHO "$complete" | $GREP " "`
17501        if test "x$has_space" != x; then
17502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17504        fi
17505        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17506      fi
17507    fi
17508
17509    # Now join together the path and the arguments once again
17510    if test "x$arguments" != xEOL; then
17511      new_complete="$new_path ${arguments% *}"
17512    else
17513      new_complete="$new_path"
17514    fi
17515
17516    if test "x$complete" != "x$new_complete"; then
17517      FOUND_MAKE="$new_complete"
17518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17519$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17520    fi
17521  fi
17522
17523        fi
17524      fi
17525    fi
17526  fi
17527
17528    fi
17529
17530    if test "x$FOUND_MAKE" = x; then
17531      if test "x$TOOLCHAIN_PATH" != x; then
17532        # We have a toolchain path, check that as well before giving up.
17533        OLD_PATH=$PATH
17534        PATH=$TOOLCHAIN_PATH:$PATH
17535        for ac_prog in gmake
17536do
17537  # Extract the first word of "$ac_prog", so it can be a program name with args.
17538set dummy $ac_prog; ac_word=$2
17539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17540$as_echo_n "checking for $ac_word... " >&6; }
17541if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17542  $as_echo_n "(cached) " >&6
17543else
17544  case $CHECK_TOOLSDIR_GMAKE in
17545  [\\/]* | ?:[\\/]*)
17546  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17547  ;;
17548  *)
17549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17550for as_dir in $PATH
17551do
17552  IFS=$as_save_IFS
17553  test -z "$as_dir" && as_dir=.
17554    for ac_exec_ext in '' $ac_executable_extensions; do
17555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17556    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17558    break 2
17559  fi
17560done
17561  done
17562IFS=$as_save_IFS
17563
17564  ;;
17565esac
17566fi
17567CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17568if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17570$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17571else
17572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17573$as_echo "no" >&6; }
17574fi
17575
17576
17577  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17578done
17579
17580
17581  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17582  DESCRIPTION="gmake in tools-dir"
17583
17584  # On Cygwin, we require a newer version of make than on other platforms
17585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17586    MAKE_VERSION_EXPR="-e 4\."
17587    MAKE_REQUIRED_VERSION="4.0"
17588   else
17589    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17590    MAKE_REQUIRED_VERSION="3.81"
17591  fi
17592
17593  if test "x$MAKE_CANDIDATE" != x; then
17594    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17595$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17596    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17597    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17598    if test "x$IS_GNU_MAKE" = x; then
17599      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17600$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17601    else
17602      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17603      if test "x$IS_MODERN_MAKE" = x; then
17604        { $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
17605$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;}
17606      else
17607        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17608          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17609            MAKE_EXPECTED_ENV='cygwin'
17610          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17611            MAKE_EXPECTED_ENV='msys'
17612          else
17613            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17614          fi
17615          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17616          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17617        else
17618          # Not relevant for non-Windows
17619          IS_MAKE_CORRECT_ENV=true
17620        fi
17621        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17622          { $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
17623$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;}
17624        else
17625          FOUND_MAKE=$MAKE_CANDIDATE
17626
17627  # Only process if variable expands to non-empty
17628
17629  if test "x$FOUND_MAKE" != x; then
17630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17631
17632  # First separate the path from the arguments. This will split at the first
17633  # space.
17634  complete="$FOUND_MAKE"
17635  path="${complete%% *}"
17636  tmp="$complete EOL"
17637  arguments="${tmp#* }"
17638
17639  # Input might be given as Windows format, start by converting to
17640  # unix format.
17641  new_path=`$CYGPATH -u "$path"`
17642
17643  # Now try to locate executable using which
17644  new_path=`$WHICH "$new_path" 2> /dev/null`
17645  # bat and cmd files are not always considered executable in cygwin causing which
17646  # to not find them
17647  if test "x$new_path" = x \
17648      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17649      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17650    new_path=`$CYGPATH -u "$path"`
17651  fi
17652  if test "x$new_path" = x; then
17653    # Oops. Which didn't find the executable.
17654    # The splitting of arguments from the executable at a space might have been incorrect,
17655    # since paths with space are more likely in Windows. Give it another try with the whole
17656    # argument.
17657    path="$complete"
17658    arguments="EOL"
17659    new_path=`$CYGPATH -u "$path"`
17660    new_path=`$WHICH "$new_path" 2> /dev/null`
17661    # bat and cmd files are not always considered executable in cygwin causing which
17662    # to not find them
17663    if test "x$new_path" = x \
17664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17666      new_path=`$CYGPATH -u "$path"`
17667    fi
17668    if test "x$new_path" = x; then
17669      # It's still not found. Now this is an unrecoverable error.
17670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17671$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17672      has_space=`$ECHO "$complete" | $GREP " "`
17673      if test "x$has_space" != x; then
17674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17676      fi
17677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17678    fi
17679  fi
17680
17681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17684  # "foo.exe" is OK but "foo" is an error.
17685  #
17686  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17687  # It is also a way to make sure we got the proper file name for the real test later on.
17688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17689  if test "x$test_shortpath" = x; then
17690    # Short path failed, file does not exist as specified.
17691    # Try adding .exe or .cmd
17692    if test -f "${new_path}.exe"; then
17693      input_to_shortpath="${new_path}.exe"
17694    elif test -f "${new_path}.cmd"; then
17695      input_to_shortpath="${new_path}.cmd"
17696    else
17697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17702    fi
17703  else
17704    input_to_shortpath="$new_path"
17705  fi
17706
17707  # Call helper function which possibly converts this using DOS-style short mode.
17708  # If so, the updated path is stored in $new_path.
17709  new_path="$input_to_shortpath"
17710
17711  input_path="$input_to_shortpath"
17712  # Check if we need to convert this using DOS-style short mode. If the path
17713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17714  # take no chances and rewrite it.
17715  # Note: m4 eats our [], so we need to use [ and ] instead.
17716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17717  if test "x$has_forbidden_chars" != x; then
17718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17722      # Going to short mode and back again did indeed matter. Since short mode is
17723      # case insensitive, let's make it lowercase to improve readability.
17724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17725      # Now convert it back to Unix-style (cygpath)
17726      input_path=`$CYGPATH -u "$shortmode_path"`
17727      new_path="$input_path"
17728    fi
17729  fi
17730
17731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17732  if test "x$test_cygdrive_prefix" = x; then
17733    # As a simple fix, exclude /usr/bin since it's not a real path.
17734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17736      # a path prefixed by /cygdrive for fixpath to work.
17737      new_path="$CYGWIN_ROOT_PATH$input_path"
17738    fi
17739  fi
17740
17741  # remove trailing .exe if any
17742  new_path="${new_path/%.exe/}"
17743
17744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17745
17746  # First separate the path from the arguments. This will split at the first
17747  # space.
17748  complete="$FOUND_MAKE"
17749  path="${complete%% *}"
17750  tmp="$complete EOL"
17751  arguments="${tmp#* }"
17752
17753  # Input might be given as Windows format, start by converting to
17754  # unix format.
17755  new_path="$path"
17756
17757  windows_path="$new_path"
17758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17759    unix_path=`$CYGPATH -u "$windows_path"`
17760    new_path="$unix_path"
17761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17763    new_path="$unix_path"
17764  fi
17765
17766
17767  # Now try to locate executable using which
17768  new_path=`$WHICH "$new_path" 2> /dev/null`
17769
17770  if test "x$new_path" = x; then
17771    # Oops. Which didn't find the executable.
17772    # The splitting of arguments from the executable at a space might have been incorrect,
17773    # since paths with space are more likely in Windows. Give it another try with the whole
17774    # argument.
17775    path="$complete"
17776    arguments="EOL"
17777    new_path="$path"
17778
17779  windows_path="$new_path"
17780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17781    unix_path=`$CYGPATH -u "$windows_path"`
17782    new_path="$unix_path"
17783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17785    new_path="$unix_path"
17786  fi
17787
17788
17789    new_path=`$WHICH "$new_path" 2> /dev/null`
17790    # bat and cmd files are not always considered executable in MSYS causing which
17791    # to not find them
17792    if test "x$new_path" = x \
17793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17795      new_path="$path"
17796
17797  windows_path="$new_path"
17798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17799    unix_path=`$CYGPATH -u "$windows_path"`
17800    new_path="$unix_path"
17801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17803    new_path="$unix_path"
17804  fi
17805
17806    fi
17807
17808    if test "x$new_path" = x; then
17809      # It's still not found. Now this is an unrecoverable error.
17810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17811$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17812      has_space=`$ECHO "$complete" | $GREP " "`
17813      if test "x$has_space" != x; then
17814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17816      fi
17817      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17818    fi
17819  fi
17820
17821  # Now new_path has a complete unix path to the binary
17822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17823    # Keep paths in /bin as-is, but remove trailing .exe if any
17824    new_path="${new_path/%.exe/}"
17825    # Do not save /bin paths to all_fixpath_prefixes!
17826  else
17827    # Not in mixed or Windows style, start by that.
17828    new_path=`cmd //c echo $new_path`
17829
17830  input_path="$new_path"
17831  # Check if we need to convert this using DOS-style short mode. If the path
17832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17833  # take no chances and rewrite it.
17834  # Note: m4 eats our [], so we need to use [ and ] instead.
17835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17836  if test "x$has_forbidden_chars" != x; then
17837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17839  fi
17840
17841    # Output is in $new_path
17842
17843  windows_path="$new_path"
17844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17845    unix_path=`$CYGPATH -u "$windows_path"`
17846    new_path="$unix_path"
17847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17849    new_path="$unix_path"
17850  fi
17851
17852    # remove trailing .exe if any
17853    new_path="${new_path/%.exe/}"
17854
17855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17857  fi
17858
17859    else
17860      # We're on a unix platform. Hooray! :)
17861      # First separate the path from the arguments. This will split at the first
17862      # space.
17863      complete="$FOUND_MAKE"
17864      path="${complete%% *}"
17865      tmp="$complete EOL"
17866      arguments="${tmp#* }"
17867
17868      # Cannot rely on the command "which" here since it doesn't always work.
17869      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17870      if test -z "$is_absolute_path"; then
17871        # Path to executable is not absolute. Find it.
17872        IFS_save="$IFS"
17873        IFS=:
17874        for p in $PATH; do
17875          if test -f "$p/$path" && test -x "$p/$path"; then
17876            new_path="$p/$path"
17877            break
17878          fi
17879        done
17880        IFS="$IFS_save"
17881      else
17882        # This is an absolute path, we can use it without further modifications.
17883        new_path="$path"
17884      fi
17885
17886      if test "x$new_path" = x; then
17887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17889        has_space=`$ECHO "$complete" | $GREP " "`
17890        if test "x$has_space" != x; then
17891          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17893        fi
17894        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17895      fi
17896    fi
17897
17898    # Now join together the path and the arguments once again
17899    if test "x$arguments" != xEOL; then
17900      new_complete="$new_path ${arguments% *}"
17901    else
17902      new_complete="$new_path"
17903    fi
17904
17905    if test "x$complete" != "x$new_complete"; then
17906      FOUND_MAKE="$new_complete"
17907      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17908$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17909    fi
17910  fi
17911
17912        fi
17913      fi
17914    fi
17915  fi
17916
17917        if test "x$FOUND_MAKE" = x; then
17918          for ac_prog in make
17919do
17920  # Extract the first word of "$ac_prog", so it can be a program name with args.
17921set dummy $ac_prog; ac_word=$2
17922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17923$as_echo_n "checking for $ac_word... " >&6; }
17924if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17925  $as_echo_n "(cached) " >&6
17926else
17927  case $CHECK_TOOLSDIR_MAKE in
17928  [\\/]* | ?:[\\/]*)
17929  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17930  ;;
17931  *)
17932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17933for as_dir in $PATH
17934do
17935  IFS=$as_save_IFS
17936  test -z "$as_dir" && as_dir=.
17937    for ac_exec_ext in '' $ac_executable_extensions; do
17938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17939    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17941    break 2
17942  fi
17943done
17944  done
17945IFS=$as_save_IFS
17946
17947  ;;
17948esac
17949fi
17950CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17951if test -n "$CHECK_TOOLSDIR_MAKE"; then
17952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17953$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17954else
17955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17956$as_echo "no" >&6; }
17957fi
17958
17959
17960  test -n "$CHECK_TOOLSDIR_MAKE" && break
17961done
17962
17963
17964  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17965  DESCRIPTION="make in tools-dir"
17966
17967  # On Cygwin, we require a newer version of make than on other platforms
17968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17969    MAKE_VERSION_EXPR="-e 4\."
17970    MAKE_REQUIRED_VERSION="4.0"
17971   else
17972    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17973    MAKE_REQUIRED_VERSION="3.81"
17974  fi
17975
17976  if test "x$MAKE_CANDIDATE" != x; then
17977    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17978$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17979    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17980    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17981    if test "x$IS_GNU_MAKE" = x; then
17982      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17983$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17984    else
17985      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17986      if test "x$IS_MODERN_MAKE" = x; then
17987        { $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
17988$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;}
17989      else
17990        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17991          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17992            MAKE_EXPECTED_ENV='cygwin'
17993          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17994            MAKE_EXPECTED_ENV='msys'
17995          else
17996            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17997          fi
17998          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17999          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18000        else
18001          # Not relevant for non-Windows
18002          IS_MAKE_CORRECT_ENV=true
18003        fi
18004        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18005          { $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
18006$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;}
18007        else
18008          FOUND_MAKE=$MAKE_CANDIDATE
18009
18010  # Only process if variable expands to non-empty
18011
18012  if test "x$FOUND_MAKE" != x; then
18013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18014
18015  # First separate the path from the arguments. This will split at the first
18016  # space.
18017  complete="$FOUND_MAKE"
18018  path="${complete%% *}"
18019  tmp="$complete EOL"
18020  arguments="${tmp#* }"
18021
18022  # Input might be given as Windows format, start by converting to
18023  # unix format.
18024  new_path=`$CYGPATH -u "$path"`
18025
18026  # Now try to locate executable using which
18027  new_path=`$WHICH "$new_path" 2> /dev/null`
18028  # bat and cmd files are not always considered executable in cygwin causing which
18029  # to not find them
18030  if test "x$new_path" = x \
18031      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18032      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18033    new_path=`$CYGPATH -u "$path"`
18034  fi
18035  if test "x$new_path" = x; then
18036    # Oops. Which didn't find the executable.
18037    # The splitting of arguments from the executable at a space might have been incorrect,
18038    # since paths with space are more likely in Windows. Give it another try with the whole
18039    # argument.
18040    path="$complete"
18041    arguments="EOL"
18042    new_path=`$CYGPATH -u "$path"`
18043    new_path=`$WHICH "$new_path" 2> /dev/null`
18044    # bat and cmd files are not always considered executable in cygwin causing which
18045    # to not find them
18046    if test "x$new_path" = x \
18047        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18048        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18049      new_path=`$CYGPATH -u "$path"`
18050    fi
18051    if test "x$new_path" = x; then
18052      # It's still not found. Now this is an unrecoverable error.
18053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18054$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18055      has_space=`$ECHO "$complete" | $GREP " "`
18056      if test "x$has_space" != x; then
18057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18059      fi
18060      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18061    fi
18062  fi
18063
18064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18067  # "foo.exe" is OK but "foo" is an error.
18068  #
18069  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18070  # It is also a way to make sure we got the proper file name for the real test later on.
18071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18072  if test "x$test_shortpath" = x; then
18073    # Short path failed, file does not exist as specified.
18074    # Try adding .exe or .cmd
18075    if test -f "${new_path}.exe"; then
18076      input_to_shortpath="${new_path}.exe"
18077    elif test -f "${new_path}.cmd"; then
18078      input_to_shortpath="${new_path}.cmd"
18079    else
18080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18081$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18082      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18083$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18084      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18085    fi
18086  else
18087    input_to_shortpath="$new_path"
18088  fi
18089
18090  # Call helper function which possibly converts this using DOS-style short mode.
18091  # If so, the updated path is stored in $new_path.
18092  new_path="$input_to_shortpath"
18093
18094  input_path="$input_to_shortpath"
18095  # Check if we need to convert this using DOS-style short mode. If the path
18096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18097  # take no chances and rewrite it.
18098  # Note: m4 eats our [], so we need to use [ and ] instead.
18099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18100  if test "x$has_forbidden_chars" != x; then
18101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18105      # Going to short mode and back again did indeed matter. Since short mode is
18106      # case insensitive, let's make it lowercase to improve readability.
18107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18108      # Now convert it back to Unix-style (cygpath)
18109      input_path=`$CYGPATH -u "$shortmode_path"`
18110      new_path="$input_path"
18111    fi
18112  fi
18113
18114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18115  if test "x$test_cygdrive_prefix" = x; then
18116    # As a simple fix, exclude /usr/bin since it's not a real path.
18117    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18119      # a path prefixed by /cygdrive for fixpath to work.
18120      new_path="$CYGWIN_ROOT_PATH$input_path"
18121    fi
18122  fi
18123
18124  # remove trailing .exe if any
18125  new_path="${new_path/%.exe/}"
18126
18127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18128
18129  # First separate the path from the arguments. This will split at the first
18130  # space.
18131  complete="$FOUND_MAKE"
18132  path="${complete%% *}"
18133  tmp="$complete EOL"
18134  arguments="${tmp#* }"
18135
18136  # Input might be given as Windows format, start by converting to
18137  # unix format.
18138  new_path="$path"
18139
18140  windows_path="$new_path"
18141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18142    unix_path=`$CYGPATH -u "$windows_path"`
18143    new_path="$unix_path"
18144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18146    new_path="$unix_path"
18147  fi
18148
18149
18150  # Now try to locate executable using which
18151  new_path=`$WHICH "$new_path" 2> /dev/null`
18152
18153  if test "x$new_path" = x; then
18154    # Oops. Which didn't find the executable.
18155    # The splitting of arguments from the executable at a space might have been incorrect,
18156    # since paths with space are more likely in Windows. Give it another try with the whole
18157    # argument.
18158    path="$complete"
18159    arguments="EOL"
18160    new_path="$path"
18161
18162  windows_path="$new_path"
18163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18164    unix_path=`$CYGPATH -u "$windows_path"`
18165    new_path="$unix_path"
18166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18168    new_path="$unix_path"
18169  fi
18170
18171
18172    new_path=`$WHICH "$new_path" 2> /dev/null`
18173    # bat and cmd files are not always considered executable in MSYS causing which
18174    # to not find them
18175    if test "x$new_path" = x \
18176        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18177        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18178      new_path="$path"
18179
18180  windows_path="$new_path"
18181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18182    unix_path=`$CYGPATH -u "$windows_path"`
18183    new_path="$unix_path"
18184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18186    new_path="$unix_path"
18187  fi
18188
18189    fi
18190
18191    if test "x$new_path" = x; then
18192      # It's still not found. Now this is an unrecoverable error.
18193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18194$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18195      has_space=`$ECHO "$complete" | $GREP " "`
18196      if test "x$has_space" != x; then
18197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18199      fi
18200      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18201    fi
18202  fi
18203
18204  # Now new_path has a complete unix path to the binary
18205  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18206    # Keep paths in /bin as-is, but remove trailing .exe if any
18207    new_path="${new_path/%.exe/}"
18208    # Do not save /bin paths to all_fixpath_prefixes!
18209  else
18210    # Not in mixed or Windows style, start by that.
18211    new_path=`cmd //c echo $new_path`
18212
18213  input_path="$new_path"
18214  # Check if we need to convert this using DOS-style short mode. If the path
18215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18216  # take no chances and rewrite it.
18217  # Note: m4 eats our [], so we need to use [ and ] instead.
18218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18219  if test "x$has_forbidden_chars" != x; then
18220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18222  fi
18223
18224    # Output is in $new_path
18225
18226  windows_path="$new_path"
18227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18228    unix_path=`$CYGPATH -u "$windows_path"`
18229    new_path="$unix_path"
18230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18232    new_path="$unix_path"
18233  fi
18234
18235    # remove trailing .exe if any
18236    new_path="${new_path/%.exe/}"
18237
18238    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18239    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18240  fi
18241
18242    else
18243      # We're on a unix platform. Hooray! :)
18244      # First separate the path from the arguments. This will split at the first
18245      # space.
18246      complete="$FOUND_MAKE"
18247      path="${complete%% *}"
18248      tmp="$complete EOL"
18249      arguments="${tmp#* }"
18250
18251      # Cannot rely on the command "which" here since it doesn't always work.
18252      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18253      if test -z "$is_absolute_path"; then
18254        # Path to executable is not absolute. Find it.
18255        IFS_save="$IFS"
18256        IFS=:
18257        for p in $PATH; do
18258          if test -f "$p/$path" && test -x "$p/$path"; then
18259            new_path="$p/$path"
18260            break
18261          fi
18262        done
18263        IFS="$IFS_save"
18264      else
18265        # This is an absolute path, we can use it without further modifications.
18266        new_path="$path"
18267      fi
18268
18269      if test "x$new_path" = x; then
18270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18271$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18272        has_space=`$ECHO "$complete" | $GREP " "`
18273        if test "x$has_space" != x; then
18274          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18275$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18276        fi
18277        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18278      fi
18279    fi
18280
18281    # Now join together the path and the arguments once again
18282    if test "x$arguments" != xEOL; then
18283      new_complete="$new_path ${arguments% *}"
18284    else
18285      new_complete="$new_path"
18286    fi
18287
18288    if test "x$complete" != "x$new_complete"; then
18289      FOUND_MAKE="$new_complete"
18290      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18291$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18292    fi
18293  fi
18294
18295        fi
18296      fi
18297    fi
18298  fi
18299
18300        fi
18301        PATH=$OLD_PATH
18302      fi
18303    fi
18304
18305    if test "x$FOUND_MAKE" = x; then
18306      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
18307    fi
18308
18309  else
18310    # The variable is set, but is it from the command line or the environment?
18311
18312    # Try to remove the string !MAKE! from our list.
18313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18315      # If it failed, the variable was not from the command line. Ignore it,
18316      # but warn the user (except for BASH, which is always set by the calling BASH).
18317      if test "xMAKE" != xBASH; then
18318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18319$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18320      fi
18321      # Try to locate tool using the code snippet
18322
18323    # Try our hardest to locate a correct version of GNU make
18324    for ac_prog in gmake
18325do
18326  # Extract the first word of "$ac_prog", so it can be a program name with args.
18327set dummy $ac_prog; ac_word=$2
18328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18329$as_echo_n "checking for $ac_word... " >&6; }
18330if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18331  $as_echo_n "(cached) " >&6
18332else
18333  case $CHECK_GMAKE in
18334  [\\/]* | ?:[\\/]*)
18335  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18336  ;;
18337  *)
18338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18339for as_dir in $PATH
18340do
18341  IFS=$as_save_IFS
18342  test -z "$as_dir" && as_dir=.
18343    for ac_exec_ext in '' $ac_executable_extensions; do
18344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18345    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18347    break 2
18348  fi
18349done
18350  done
18351IFS=$as_save_IFS
18352
18353  ;;
18354esac
18355fi
18356CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18357if test -n "$CHECK_GMAKE"; then
18358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18359$as_echo "$CHECK_GMAKE" >&6; }
18360else
18361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18362$as_echo "no" >&6; }
18363fi
18364
18365
18366  test -n "$CHECK_GMAKE" && break
18367done
18368
18369
18370  MAKE_CANDIDATE=""$CHECK_GMAKE""
18371  DESCRIPTION="gmake in PATH"
18372
18373  # On Cygwin, we require a newer version of make than on other platforms
18374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18375    MAKE_VERSION_EXPR="-e 4\."
18376    MAKE_REQUIRED_VERSION="4.0"
18377   else
18378    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18379    MAKE_REQUIRED_VERSION="3.81"
18380  fi
18381
18382  if test "x$MAKE_CANDIDATE" != x; then
18383    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18384$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18385    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18386    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18387    if test "x$IS_GNU_MAKE" = x; then
18388      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18389$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18390    else
18391      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18392      if test "x$IS_MODERN_MAKE" = x; then
18393        { $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
18394$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;}
18395      else
18396        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18397          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18398            MAKE_EXPECTED_ENV='cygwin'
18399          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18400            MAKE_EXPECTED_ENV='msys'
18401          else
18402            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18403          fi
18404          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18405          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18406        else
18407          # Not relevant for non-Windows
18408          IS_MAKE_CORRECT_ENV=true
18409        fi
18410        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18411          { $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
18412$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;}
18413        else
18414          FOUND_MAKE=$MAKE_CANDIDATE
18415
18416  # Only process if variable expands to non-empty
18417
18418  if test "x$FOUND_MAKE" != x; then
18419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18420
18421  # First separate the path from the arguments. This will split at the first
18422  # space.
18423  complete="$FOUND_MAKE"
18424  path="${complete%% *}"
18425  tmp="$complete EOL"
18426  arguments="${tmp#* }"
18427
18428  # Input might be given as Windows format, start by converting to
18429  # unix format.
18430  new_path=`$CYGPATH -u "$path"`
18431
18432  # Now try to locate executable using which
18433  new_path=`$WHICH "$new_path" 2> /dev/null`
18434  # bat and cmd files are not always considered executable in cygwin causing which
18435  # to not find them
18436  if test "x$new_path" = x \
18437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18439    new_path=`$CYGPATH -u "$path"`
18440  fi
18441  if test "x$new_path" = x; then
18442    # Oops. Which didn't find the executable.
18443    # The splitting of arguments from the executable at a space might have been incorrect,
18444    # since paths with space are more likely in Windows. Give it another try with the whole
18445    # argument.
18446    path="$complete"
18447    arguments="EOL"
18448    new_path=`$CYGPATH -u "$path"`
18449    new_path=`$WHICH "$new_path" 2> /dev/null`
18450    # bat and cmd files are not always considered executable in cygwin causing which
18451    # to not find them
18452    if test "x$new_path" = x \
18453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18455      new_path=`$CYGPATH -u "$path"`
18456    fi
18457    if test "x$new_path" = x; then
18458      # It's still not found. Now this is an unrecoverable error.
18459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18460$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18461      has_space=`$ECHO "$complete" | $GREP " "`
18462      if test "x$has_space" != x; then
18463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18465      fi
18466      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18467    fi
18468  fi
18469
18470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18473  # "foo.exe" is OK but "foo" is an error.
18474  #
18475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18476  # It is also a way to make sure we got the proper file name for the real test later on.
18477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18478  if test "x$test_shortpath" = x; then
18479    # Short path failed, file does not exist as specified.
18480    # Try adding .exe or .cmd
18481    if test -f "${new_path}.exe"; then
18482      input_to_shortpath="${new_path}.exe"
18483    elif test -f "${new_path}.cmd"; then
18484      input_to_shortpath="${new_path}.cmd"
18485    else
18486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18490      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18491    fi
18492  else
18493    input_to_shortpath="$new_path"
18494  fi
18495
18496  # Call helper function which possibly converts this using DOS-style short mode.
18497  # If so, the updated path is stored in $new_path.
18498  new_path="$input_to_shortpath"
18499
18500  input_path="$input_to_shortpath"
18501  # Check if we need to convert this using DOS-style short mode. If the path
18502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18503  # take no chances and rewrite it.
18504  # Note: m4 eats our [], so we need to use [ and ] instead.
18505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18506  if test "x$has_forbidden_chars" != x; then
18507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18511      # Going to short mode and back again did indeed matter. Since short mode is
18512      # case insensitive, let's make it lowercase to improve readability.
18513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18514      # Now convert it back to Unix-style (cygpath)
18515      input_path=`$CYGPATH -u "$shortmode_path"`
18516      new_path="$input_path"
18517    fi
18518  fi
18519
18520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18521  if test "x$test_cygdrive_prefix" = x; then
18522    # As a simple fix, exclude /usr/bin since it's not a real path.
18523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18525      # a path prefixed by /cygdrive for fixpath to work.
18526      new_path="$CYGWIN_ROOT_PATH$input_path"
18527    fi
18528  fi
18529
18530  # remove trailing .exe if any
18531  new_path="${new_path/%.exe/}"
18532
18533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18534
18535  # First separate the path from the arguments. This will split at the first
18536  # space.
18537  complete="$FOUND_MAKE"
18538  path="${complete%% *}"
18539  tmp="$complete EOL"
18540  arguments="${tmp#* }"
18541
18542  # Input might be given as Windows format, start by converting to
18543  # unix format.
18544  new_path="$path"
18545
18546  windows_path="$new_path"
18547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18548    unix_path=`$CYGPATH -u "$windows_path"`
18549    new_path="$unix_path"
18550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18552    new_path="$unix_path"
18553  fi
18554
18555
18556  # Now try to locate executable using which
18557  new_path=`$WHICH "$new_path" 2> /dev/null`
18558
18559  if test "x$new_path" = x; then
18560    # Oops. Which didn't find the executable.
18561    # The splitting of arguments from the executable at a space might have been incorrect,
18562    # since paths with space are more likely in Windows. Give it another try with the whole
18563    # argument.
18564    path="$complete"
18565    arguments="EOL"
18566    new_path="$path"
18567
18568  windows_path="$new_path"
18569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570    unix_path=`$CYGPATH -u "$windows_path"`
18571    new_path="$unix_path"
18572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18574    new_path="$unix_path"
18575  fi
18576
18577
18578    new_path=`$WHICH "$new_path" 2> /dev/null`
18579    # bat and cmd files are not always considered executable in MSYS causing which
18580    # to not find them
18581    if test "x$new_path" = x \
18582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18584      new_path="$path"
18585
18586  windows_path="$new_path"
18587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18588    unix_path=`$CYGPATH -u "$windows_path"`
18589    new_path="$unix_path"
18590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18592    new_path="$unix_path"
18593  fi
18594
18595    fi
18596
18597    if test "x$new_path" = x; then
18598      # It's still not found. Now this is an unrecoverable error.
18599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18600$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18601      has_space=`$ECHO "$complete" | $GREP " "`
18602      if test "x$has_space" != x; then
18603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18605      fi
18606      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18607    fi
18608  fi
18609
18610  # Now new_path has a complete unix path to the binary
18611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18612    # Keep paths in /bin as-is, but remove trailing .exe if any
18613    new_path="${new_path/%.exe/}"
18614    # Do not save /bin paths to all_fixpath_prefixes!
18615  else
18616    # Not in mixed or Windows style, start by that.
18617    new_path=`cmd //c echo $new_path`
18618
18619  input_path="$new_path"
18620  # Check if we need to convert this using DOS-style short mode. If the path
18621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18622  # take no chances and rewrite it.
18623  # Note: m4 eats our [], so we need to use [ and ] instead.
18624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18625  if test "x$has_forbidden_chars" != x; then
18626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18628  fi
18629
18630    # Output is in $new_path
18631
18632  windows_path="$new_path"
18633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634    unix_path=`$CYGPATH -u "$windows_path"`
18635    new_path="$unix_path"
18636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18638    new_path="$unix_path"
18639  fi
18640
18641    # remove trailing .exe if any
18642    new_path="${new_path/%.exe/}"
18643
18644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18646  fi
18647
18648    else
18649      # We're on a unix platform. Hooray! :)
18650      # First separate the path from the arguments. This will split at the first
18651      # space.
18652      complete="$FOUND_MAKE"
18653      path="${complete%% *}"
18654      tmp="$complete EOL"
18655      arguments="${tmp#* }"
18656
18657      # Cannot rely on the command "which" here since it doesn't always work.
18658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18659      if test -z "$is_absolute_path"; then
18660        # Path to executable is not absolute. Find it.
18661        IFS_save="$IFS"
18662        IFS=:
18663        for p in $PATH; do
18664          if test -f "$p/$path" && test -x "$p/$path"; then
18665            new_path="$p/$path"
18666            break
18667          fi
18668        done
18669        IFS="$IFS_save"
18670      else
18671        # This is an absolute path, we can use it without further modifications.
18672        new_path="$path"
18673      fi
18674
18675      if test "x$new_path" = x; then
18676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18678        has_space=`$ECHO "$complete" | $GREP " "`
18679        if test "x$has_space" != x; then
18680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18682        fi
18683        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18684      fi
18685    fi
18686
18687    # Now join together the path and the arguments once again
18688    if test "x$arguments" != xEOL; then
18689      new_complete="$new_path ${arguments% *}"
18690    else
18691      new_complete="$new_path"
18692    fi
18693
18694    if test "x$complete" != "x$new_complete"; then
18695      FOUND_MAKE="$new_complete"
18696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18697$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18698    fi
18699  fi
18700
18701        fi
18702      fi
18703    fi
18704  fi
18705
18706
18707    if test "x$FOUND_MAKE" = x; then
18708      for ac_prog in make
18709do
18710  # Extract the first word of "$ac_prog", so it can be a program name with args.
18711set dummy $ac_prog; ac_word=$2
18712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18713$as_echo_n "checking for $ac_word... " >&6; }
18714if ${ac_cv_path_CHECK_MAKE+:} false; then :
18715  $as_echo_n "(cached) " >&6
18716else
18717  case $CHECK_MAKE in
18718  [\\/]* | ?:[\\/]*)
18719  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18720  ;;
18721  *)
18722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18723for as_dir in $PATH
18724do
18725  IFS=$as_save_IFS
18726  test -z "$as_dir" && as_dir=.
18727    for ac_exec_ext in '' $ac_executable_extensions; do
18728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18729    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18731    break 2
18732  fi
18733done
18734  done
18735IFS=$as_save_IFS
18736
18737  ;;
18738esac
18739fi
18740CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18741if test -n "$CHECK_MAKE"; then
18742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18743$as_echo "$CHECK_MAKE" >&6; }
18744else
18745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18746$as_echo "no" >&6; }
18747fi
18748
18749
18750  test -n "$CHECK_MAKE" && break
18751done
18752
18753
18754  MAKE_CANDIDATE=""$CHECK_MAKE""
18755  DESCRIPTION="make in PATH"
18756
18757  # On Cygwin, we require a newer version of make than on other platforms
18758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18759    MAKE_VERSION_EXPR="-e 4\."
18760    MAKE_REQUIRED_VERSION="4.0"
18761   else
18762    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18763    MAKE_REQUIRED_VERSION="3.81"
18764  fi
18765
18766  if test "x$MAKE_CANDIDATE" != x; then
18767    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18768$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18769    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18770    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18771    if test "x$IS_GNU_MAKE" = x; then
18772      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18773$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18774    else
18775      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18776      if test "x$IS_MODERN_MAKE" = x; then
18777        { $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
18778$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;}
18779      else
18780        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18781          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18782            MAKE_EXPECTED_ENV='cygwin'
18783          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18784            MAKE_EXPECTED_ENV='msys'
18785          else
18786            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18787          fi
18788          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18789          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18790        else
18791          # Not relevant for non-Windows
18792          IS_MAKE_CORRECT_ENV=true
18793        fi
18794        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18795          { $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
18796$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;}
18797        else
18798          FOUND_MAKE=$MAKE_CANDIDATE
18799
18800  # Only process if variable expands to non-empty
18801
18802  if test "x$FOUND_MAKE" != x; then
18803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18804
18805  # First separate the path from the arguments. This will split at the first
18806  # space.
18807  complete="$FOUND_MAKE"
18808  path="${complete%% *}"
18809  tmp="$complete EOL"
18810  arguments="${tmp#* }"
18811
18812  # Input might be given as Windows format, start by converting to
18813  # unix format.
18814  new_path=`$CYGPATH -u "$path"`
18815
18816  # Now try to locate executable using which
18817  new_path=`$WHICH "$new_path" 2> /dev/null`
18818  # bat and cmd files are not always considered executable in cygwin causing which
18819  # to not find them
18820  if test "x$new_path" = x \
18821      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18822      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18823    new_path=`$CYGPATH -u "$path"`
18824  fi
18825  if test "x$new_path" = x; then
18826    # Oops. Which didn't find the executable.
18827    # The splitting of arguments from the executable at a space might have been incorrect,
18828    # since paths with space are more likely in Windows. Give it another try with the whole
18829    # argument.
18830    path="$complete"
18831    arguments="EOL"
18832    new_path=`$CYGPATH -u "$path"`
18833    new_path=`$WHICH "$new_path" 2> /dev/null`
18834    # bat and cmd files are not always considered executable in cygwin causing which
18835    # to not find them
18836    if test "x$new_path" = x \
18837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18839      new_path=`$CYGPATH -u "$path"`
18840    fi
18841    if test "x$new_path" = x; then
18842      # It's still not found. Now this is an unrecoverable error.
18843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18844$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18845      has_space=`$ECHO "$complete" | $GREP " "`
18846      if test "x$has_space" != x; then
18847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18849      fi
18850      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18851    fi
18852  fi
18853
18854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18857  # "foo.exe" is OK but "foo" is an error.
18858  #
18859  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18860  # It is also a way to make sure we got the proper file name for the real test later on.
18861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18862  if test "x$test_shortpath" = x; then
18863    # Short path failed, file does not exist as specified.
18864    # Try adding .exe or .cmd
18865    if test -f "${new_path}.exe"; then
18866      input_to_shortpath="${new_path}.exe"
18867    elif test -f "${new_path}.cmd"; then
18868      input_to_shortpath="${new_path}.cmd"
18869    else
18870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18871$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18872      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18873$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18874      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18875    fi
18876  else
18877    input_to_shortpath="$new_path"
18878  fi
18879
18880  # Call helper function which possibly converts this using DOS-style short mode.
18881  # If so, the updated path is stored in $new_path.
18882  new_path="$input_to_shortpath"
18883
18884  input_path="$input_to_shortpath"
18885  # Check if we need to convert this using DOS-style short mode. If the path
18886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18887  # take no chances and rewrite it.
18888  # Note: m4 eats our [], so we need to use [ and ] instead.
18889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18890  if test "x$has_forbidden_chars" != x; then
18891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18895      # Going to short mode and back again did indeed matter. Since short mode is
18896      # case insensitive, let's make it lowercase to improve readability.
18897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18898      # Now convert it back to Unix-style (cygpath)
18899      input_path=`$CYGPATH -u "$shortmode_path"`
18900      new_path="$input_path"
18901    fi
18902  fi
18903
18904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18905  if test "x$test_cygdrive_prefix" = x; then
18906    # As a simple fix, exclude /usr/bin since it's not a real path.
18907    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18909      # a path prefixed by /cygdrive for fixpath to work.
18910      new_path="$CYGWIN_ROOT_PATH$input_path"
18911    fi
18912  fi
18913
18914  # remove trailing .exe if any
18915  new_path="${new_path/%.exe/}"
18916
18917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18918
18919  # First separate the path from the arguments. This will split at the first
18920  # space.
18921  complete="$FOUND_MAKE"
18922  path="${complete%% *}"
18923  tmp="$complete EOL"
18924  arguments="${tmp#* }"
18925
18926  # Input might be given as Windows format, start by converting to
18927  # unix format.
18928  new_path="$path"
18929
18930  windows_path="$new_path"
18931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18932    unix_path=`$CYGPATH -u "$windows_path"`
18933    new_path="$unix_path"
18934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18936    new_path="$unix_path"
18937  fi
18938
18939
18940  # Now try to locate executable using which
18941  new_path=`$WHICH "$new_path" 2> /dev/null`
18942
18943  if test "x$new_path" = x; then
18944    # Oops. Which didn't find the executable.
18945    # The splitting of arguments from the executable at a space might have been incorrect,
18946    # since paths with space are more likely in Windows. Give it another try with the whole
18947    # argument.
18948    path="$complete"
18949    arguments="EOL"
18950    new_path="$path"
18951
18952  windows_path="$new_path"
18953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18954    unix_path=`$CYGPATH -u "$windows_path"`
18955    new_path="$unix_path"
18956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18958    new_path="$unix_path"
18959  fi
18960
18961
18962    new_path=`$WHICH "$new_path" 2> /dev/null`
18963    # bat and cmd files are not always considered executable in MSYS causing which
18964    # to not find them
18965    if test "x$new_path" = x \
18966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18968      new_path="$path"
18969
18970  windows_path="$new_path"
18971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18972    unix_path=`$CYGPATH -u "$windows_path"`
18973    new_path="$unix_path"
18974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18976    new_path="$unix_path"
18977  fi
18978
18979    fi
18980
18981    if test "x$new_path" = x; then
18982      # It's still not found. Now this is an unrecoverable error.
18983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18984$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18985      has_space=`$ECHO "$complete" | $GREP " "`
18986      if test "x$has_space" != x; then
18987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18989      fi
18990      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18991    fi
18992  fi
18993
18994  # Now new_path has a complete unix path to the binary
18995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18996    # Keep paths in /bin as-is, but remove trailing .exe if any
18997    new_path="${new_path/%.exe/}"
18998    # Do not save /bin paths to all_fixpath_prefixes!
18999  else
19000    # Not in mixed or Windows style, start by that.
19001    new_path=`cmd //c echo $new_path`
19002
19003  input_path="$new_path"
19004  # Check if we need to convert this using DOS-style short mode. If the path
19005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19006  # take no chances and rewrite it.
19007  # Note: m4 eats our [], so we need to use [ and ] instead.
19008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19009  if test "x$has_forbidden_chars" != x; then
19010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19012  fi
19013
19014    # Output is in $new_path
19015
19016  windows_path="$new_path"
19017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19018    unix_path=`$CYGPATH -u "$windows_path"`
19019    new_path="$unix_path"
19020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19022    new_path="$unix_path"
19023  fi
19024
19025    # remove trailing .exe if any
19026    new_path="${new_path/%.exe/}"
19027
19028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19030  fi
19031
19032    else
19033      # We're on a unix platform. Hooray! :)
19034      # First separate the path from the arguments. This will split at the first
19035      # space.
19036      complete="$FOUND_MAKE"
19037      path="${complete%% *}"
19038      tmp="$complete EOL"
19039      arguments="${tmp#* }"
19040
19041      # Cannot rely on the command "which" here since it doesn't always work.
19042      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19043      if test -z "$is_absolute_path"; then
19044        # Path to executable is not absolute. Find it.
19045        IFS_save="$IFS"
19046        IFS=:
19047        for p in $PATH; do
19048          if test -f "$p/$path" && test -x "$p/$path"; then
19049            new_path="$p/$path"
19050            break
19051          fi
19052        done
19053        IFS="$IFS_save"
19054      else
19055        # This is an absolute path, we can use it without further modifications.
19056        new_path="$path"
19057      fi
19058
19059      if test "x$new_path" = x; then
19060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19061$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19062        has_space=`$ECHO "$complete" | $GREP " "`
19063        if test "x$has_space" != x; then
19064          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19066        fi
19067        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19068      fi
19069    fi
19070
19071    # Now join together the path and the arguments once again
19072    if test "x$arguments" != xEOL; then
19073      new_complete="$new_path ${arguments% *}"
19074    else
19075      new_complete="$new_path"
19076    fi
19077
19078    if test "x$complete" != "x$new_complete"; then
19079      FOUND_MAKE="$new_complete"
19080      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19081$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19082    fi
19083  fi
19084
19085        fi
19086      fi
19087    fi
19088  fi
19089
19090    fi
19091
19092    if test "x$FOUND_MAKE" = x; then
19093      if test "x$TOOLCHAIN_PATH" != x; then
19094        # We have a toolchain path, check that as well before giving up.
19095        OLD_PATH=$PATH
19096        PATH=$TOOLCHAIN_PATH:$PATH
19097        for ac_prog in gmake
19098do
19099  # Extract the first word of "$ac_prog", so it can be a program name with args.
19100set dummy $ac_prog; ac_word=$2
19101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19102$as_echo_n "checking for $ac_word... " >&6; }
19103if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19104  $as_echo_n "(cached) " >&6
19105else
19106  case $CHECK_TOOLSDIR_GMAKE in
19107  [\\/]* | ?:[\\/]*)
19108  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19109  ;;
19110  *)
19111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19112for as_dir in $PATH
19113do
19114  IFS=$as_save_IFS
19115  test -z "$as_dir" && as_dir=.
19116    for ac_exec_ext in '' $ac_executable_extensions; do
19117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19118    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19120    break 2
19121  fi
19122done
19123  done
19124IFS=$as_save_IFS
19125
19126  ;;
19127esac
19128fi
19129CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19130if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19132$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19133else
19134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19135$as_echo "no" >&6; }
19136fi
19137
19138
19139  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19140done
19141
19142
19143  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19144  DESCRIPTION="gmake in tools-dir"
19145
19146  # On Cygwin, we require a newer version of make than on other platforms
19147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19148    MAKE_VERSION_EXPR="-e 4\."
19149    MAKE_REQUIRED_VERSION="4.0"
19150   else
19151    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19152    MAKE_REQUIRED_VERSION="3.81"
19153  fi
19154
19155  if test "x$MAKE_CANDIDATE" != x; then
19156    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19157$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19158    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19159    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19160    if test "x$IS_GNU_MAKE" = x; then
19161      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19162$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19163    else
19164      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19165      if test "x$IS_MODERN_MAKE" = x; then
19166        { $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
19167$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;}
19168      else
19169        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19170          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19171            MAKE_EXPECTED_ENV='cygwin'
19172          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19173            MAKE_EXPECTED_ENV='msys'
19174          else
19175            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19176          fi
19177          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19178          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19179        else
19180          # Not relevant for non-Windows
19181          IS_MAKE_CORRECT_ENV=true
19182        fi
19183        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19184          { $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
19185$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;}
19186        else
19187          FOUND_MAKE=$MAKE_CANDIDATE
19188
19189  # Only process if variable expands to non-empty
19190
19191  if test "x$FOUND_MAKE" != x; then
19192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19193
19194  # First separate the path from the arguments. This will split at the first
19195  # space.
19196  complete="$FOUND_MAKE"
19197  path="${complete%% *}"
19198  tmp="$complete EOL"
19199  arguments="${tmp#* }"
19200
19201  # Input might be given as Windows format, start by converting to
19202  # unix format.
19203  new_path=`$CYGPATH -u "$path"`
19204
19205  # Now try to locate executable using which
19206  new_path=`$WHICH "$new_path" 2> /dev/null`
19207  # bat and cmd files are not always considered executable in cygwin causing which
19208  # to not find them
19209  if test "x$new_path" = x \
19210      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19211      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19212    new_path=`$CYGPATH -u "$path"`
19213  fi
19214  if test "x$new_path" = x; then
19215    # Oops. Which didn't find the executable.
19216    # The splitting of arguments from the executable at a space might have been incorrect,
19217    # since paths with space are more likely in Windows. Give it another try with the whole
19218    # argument.
19219    path="$complete"
19220    arguments="EOL"
19221    new_path=`$CYGPATH -u "$path"`
19222    new_path=`$WHICH "$new_path" 2> /dev/null`
19223    # bat and cmd files are not always considered executable in cygwin causing which
19224    # to not find them
19225    if test "x$new_path" = x \
19226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19228      new_path=`$CYGPATH -u "$path"`
19229    fi
19230    if test "x$new_path" = x; then
19231      # It's still not found. Now this is an unrecoverable error.
19232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19233$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19234      has_space=`$ECHO "$complete" | $GREP " "`
19235      if test "x$has_space" != x; then
19236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19238      fi
19239      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19240    fi
19241  fi
19242
19243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19246  # "foo.exe" is OK but "foo" is an error.
19247  #
19248  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19249  # It is also a way to make sure we got the proper file name for the real test later on.
19250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19251  if test "x$test_shortpath" = x; then
19252    # Short path failed, file does not exist as specified.
19253    # Try adding .exe or .cmd
19254    if test -f "${new_path}.exe"; then
19255      input_to_shortpath="${new_path}.exe"
19256    elif test -f "${new_path}.cmd"; then
19257      input_to_shortpath="${new_path}.cmd"
19258    else
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19260$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19261      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19262$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19263      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19264    fi
19265  else
19266    input_to_shortpath="$new_path"
19267  fi
19268
19269  # Call helper function which possibly converts this using DOS-style short mode.
19270  # If so, the updated path is stored in $new_path.
19271  new_path="$input_to_shortpath"
19272
19273  input_path="$input_to_shortpath"
19274  # Check if we need to convert this using DOS-style short mode. If the path
19275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19276  # take no chances and rewrite it.
19277  # Note: m4 eats our [], so we need to use [ and ] instead.
19278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19279  if test "x$has_forbidden_chars" != x; then
19280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19284      # Going to short mode and back again did indeed matter. Since short mode is
19285      # case insensitive, let's make it lowercase to improve readability.
19286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19287      # Now convert it back to Unix-style (cygpath)
19288      input_path=`$CYGPATH -u "$shortmode_path"`
19289      new_path="$input_path"
19290    fi
19291  fi
19292
19293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19294  if test "x$test_cygdrive_prefix" = x; then
19295    # As a simple fix, exclude /usr/bin since it's not a real path.
19296    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19298      # a path prefixed by /cygdrive for fixpath to work.
19299      new_path="$CYGWIN_ROOT_PATH$input_path"
19300    fi
19301  fi
19302
19303  # remove trailing .exe if any
19304  new_path="${new_path/%.exe/}"
19305
19306    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19307
19308  # First separate the path from the arguments. This will split at the first
19309  # space.
19310  complete="$FOUND_MAKE"
19311  path="${complete%% *}"
19312  tmp="$complete EOL"
19313  arguments="${tmp#* }"
19314
19315  # Input might be given as Windows format, start by converting to
19316  # unix format.
19317  new_path="$path"
19318
19319  windows_path="$new_path"
19320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19321    unix_path=`$CYGPATH -u "$windows_path"`
19322    new_path="$unix_path"
19323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19325    new_path="$unix_path"
19326  fi
19327
19328
19329  # Now try to locate executable using which
19330  new_path=`$WHICH "$new_path" 2> /dev/null`
19331
19332  if test "x$new_path" = x; then
19333    # Oops. Which didn't find the executable.
19334    # The splitting of arguments from the executable at a space might have been incorrect,
19335    # since paths with space are more likely in Windows. Give it another try with the whole
19336    # argument.
19337    path="$complete"
19338    arguments="EOL"
19339    new_path="$path"
19340
19341  windows_path="$new_path"
19342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19343    unix_path=`$CYGPATH -u "$windows_path"`
19344    new_path="$unix_path"
19345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19347    new_path="$unix_path"
19348  fi
19349
19350
19351    new_path=`$WHICH "$new_path" 2> /dev/null`
19352    # bat and cmd files are not always considered executable in MSYS causing which
19353    # to not find them
19354    if test "x$new_path" = x \
19355        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19356        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19357      new_path="$path"
19358
19359  windows_path="$new_path"
19360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19361    unix_path=`$CYGPATH -u "$windows_path"`
19362    new_path="$unix_path"
19363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19365    new_path="$unix_path"
19366  fi
19367
19368    fi
19369
19370    if test "x$new_path" = x; then
19371      # It's still not found. Now this is an unrecoverable error.
19372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19373$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19374      has_space=`$ECHO "$complete" | $GREP " "`
19375      if test "x$has_space" != x; then
19376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19378      fi
19379      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19380    fi
19381  fi
19382
19383  # Now new_path has a complete unix path to the binary
19384  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19385    # Keep paths in /bin as-is, but remove trailing .exe if any
19386    new_path="${new_path/%.exe/}"
19387    # Do not save /bin paths to all_fixpath_prefixes!
19388  else
19389    # Not in mixed or Windows style, start by that.
19390    new_path=`cmd //c echo $new_path`
19391
19392  input_path="$new_path"
19393  # Check if we need to convert this using DOS-style short mode. If the path
19394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19395  # take no chances and rewrite it.
19396  # Note: m4 eats our [], so we need to use [ and ] instead.
19397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19398  if test "x$has_forbidden_chars" != x; then
19399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19401  fi
19402
19403    # Output is in $new_path
19404
19405  windows_path="$new_path"
19406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19407    unix_path=`$CYGPATH -u "$windows_path"`
19408    new_path="$unix_path"
19409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19411    new_path="$unix_path"
19412  fi
19413
19414    # remove trailing .exe if any
19415    new_path="${new_path/%.exe/}"
19416
19417    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19418    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19419  fi
19420
19421    else
19422      # We're on a unix platform. Hooray! :)
19423      # First separate the path from the arguments. This will split at the first
19424      # space.
19425      complete="$FOUND_MAKE"
19426      path="${complete%% *}"
19427      tmp="$complete EOL"
19428      arguments="${tmp#* }"
19429
19430      # Cannot rely on the command "which" here since it doesn't always work.
19431      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19432      if test -z "$is_absolute_path"; then
19433        # Path to executable is not absolute. Find it.
19434        IFS_save="$IFS"
19435        IFS=:
19436        for p in $PATH; do
19437          if test -f "$p/$path" && test -x "$p/$path"; then
19438            new_path="$p/$path"
19439            break
19440          fi
19441        done
19442        IFS="$IFS_save"
19443      else
19444        # This is an absolute path, we can use it without further modifications.
19445        new_path="$path"
19446      fi
19447
19448      if test "x$new_path" = x; then
19449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19450$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19451        has_space=`$ECHO "$complete" | $GREP " "`
19452        if test "x$has_space" != x; then
19453          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19454$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19455        fi
19456        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19457      fi
19458    fi
19459
19460    # Now join together the path and the arguments once again
19461    if test "x$arguments" != xEOL; then
19462      new_complete="$new_path ${arguments% *}"
19463    else
19464      new_complete="$new_path"
19465    fi
19466
19467    if test "x$complete" != "x$new_complete"; then
19468      FOUND_MAKE="$new_complete"
19469      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19470$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19471    fi
19472  fi
19473
19474        fi
19475      fi
19476    fi
19477  fi
19478
19479        if test "x$FOUND_MAKE" = x; then
19480          for ac_prog in make
19481do
19482  # Extract the first word of "$ac_prog", so it can be a program name with args.
19483set dummy $ac_prog; ac_word=$2
19484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19485$as_echo_n "checking for $ac_word... " >&6; }
19486if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19487  $as_echo_n "(cached) " >&6
19488else
19489  case $CHECK_TOOLSDIR_MAKE in
19490  [\\/]* | ?:[\\/]*)
19491  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19492  ;;
19493  *)
19494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19495for as_dir in $PATH
19496do
19497  IFS=$as_save_IFS
19498  test -z "$as_dir" && as_dir=.
19499    for ac_exec_ext in '' $ac_executable_extensions; do
19500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19501    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19503    break 2
19504  fi
19505done
19506  done
19507IFS=$as_save_IFS
19508
19509  ;;
19510esac
19511fi
19512CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19513if test -n "$CHECK_TOOLSDIR_MAKE"; then
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19515$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19516else
19517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19518$as_echo "no" >&6; }
19519fi
19520
19521
19522  test -n "$CHECK_TOOLSDIR_MAKE" && break
19523done
19524
19525
19526  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19527  DESCRIPTION="make in tools-dir"
19528
19529  # On Cygwin, we require a newer version of make than on other platforms
19530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19531    MAKE_VERSION_EXPR="-e 4\."
19532    MAKE_REQUIRED_VERSION="4.0"
19533   else
19534    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19535    MAKE_REQUIRED_VERSION="3.81"
19536  fi
19537
19538  if test "x$MAKE_CANDIDATE" != x; then
19539    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19540$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19541    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19542    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19543    if test "x$IS_GNU_MAKE" = x; then
19544      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19545$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19546    else
19547      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19548      if test "x$IS_MODERN_MAKE" = x; then
19549        { $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
19550$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;}
19551      else
19552        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19553          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19554            MAKE_EXPECTED_ENV='cygwin'
19555          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19556            MAKE_EXPECTED_ENV='msys'
19557          else
19558            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19559          fi
19560          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19561          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19562        else
19563          # Not relevant for non-Windows
19564          IS_MAKE_CORRECT_ENV=true
19565        fi
19566        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19567          { $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
19568$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;}
19569        else
19570          FOUND_MAKE=$MAKE_CANDIDATE
19571
19572  # Only process if variable expands to non-empty
19573
19574  if test "x$FOUND_MAKE" != x; then
19575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19576
19577  # First separate the path from the arguments. This will split at the first
19578  # space.
19579  complete="$FOUND_MAKE"
19580  path="${complete%% *}"
19581  tmp="$complete EOL"
19582  arguments="${tmp#* }"
19583
19584  # Input might be given as Windows format, start by converting to
19585  # unix format.
19586  new_path=`$CYGPATH -u "$path"`
19587
19588  # Now try to locate executable using which
19589  new_path=`$WHICH "$new_path" 2> /dev/null`
19590  # bat and cmd files are not always considered executable in cygwin causing which
19591  # to not find them
19592  if test "x$new_path" = x \
19593      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19594      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19595    new_path=`$CYGPATH -u "$path"`
19596  fi
19597  if test "x$new_path" = x; then
19598    # Oops. Which didn't find the executable.
19599    # The splitting of arguments from the executable at a space might have been incorrect,
19600    # since paths with space are more likely in Windows. Give it another try with the whole
19601    # argument.
19602    path="$complete"
19603    arguments="EOL"
19604    new_path=`$CYGPATH -u "$path"`
19605    new_path=`$WHICH "$new_path" 2> /dev/null`
19606    # bat and cmd files are not always considered executable in cygwin causing which
19607    # to not find them
19608    if test "x$new_path" = x \
19609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19611      new_path=`$CYGPATH -u "$path"`
19612    fi
19613    if test "x$new_path" = x; then
19614      # It's still not found. Now this is an unrecoverable error.
19615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19616$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19617      has_space=`$ECHO "$complete" | $GREP " "`
19618      if test "x$has_space" != x; then
19619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19621      fi
19622      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19623    fi
19624  fi
19625
19626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19629  # "foo.exe" is OK but "foo" is an error.
19630  #
19631  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19632  # It is also a way to make sure we got the proper file name for the real test later on.
19633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19634  if test "x$test_shortpath" = x; then
19635    # Short path failed, file does not exist as specified.
19636    # Try adding .exe or .cmd
19637    if test -f "${new_path}.exe"; then
19638      input_to_shortpath="${new_path}.exe"
19639    elif test -f "${new_path}.cmd"; then
19640      input_to_shortpath="${new_path}.cmd"
19641    else
19642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19643$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19644      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19645$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19646      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19647    fi
19648  else
19649    input_to_shortpath="$new_path"
19650  fi
19651
19652  # Call helper function which possibly converts this using DOS-style short mode.
19653  # If so, the updated path is stored in $new_path.
19654  new_path="$input_to_shortpath"
19655
19656  input_path="$input_to_shortpath"
19657  # Check if we need to convert this using DOS-style short mode. If the path
19658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19659  # take no chances and rewrite it.
19660  # Note: m4 eats our [], so we need to use [ and ] instead.
19661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19662  if test "x$has_forbidden_chars" != x; then
19663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19667      # Going to short mode and back again did indeed matter. Since short mode is
19668      # case insensitive, let's make it lowercase to improve readability.
19669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19670      # Now convert it back to Unix-style (cygpath)
19671      input_path=`$CYGPATH -u "$shortmode_path"`
19672      new_path="$input_path"
19673    fi
19674  fi
19675
19676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19677  if test "x$test_cygdrive_prefix" = x; then
19678    # As a simple fix, exclude /usr/bin since it's not a real path.
19679    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19681      # a path prefixed by /cygdrive for fixpath to work.
19682      new_path="$CYGWIN_ROOT_PATH$input_path"
19683    fi
19684  fi
19685
19686  # remove trailing .exe if any
19687  new_path="${new_path/%.exe/}"
19688
19689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19690
19691  # First separate the path from the arguments. This will split at the first
19692  # space.
19693  complete="$FOUND_MAKE"
19694  path="${complete%% *}"
19695  tmp="$complete EOL"
19696  arguments="${tmp#* }"
19697
19698  # Input might be given as Windows format, start by converting to
19699  # unix format.
19700  new_path="$path"
19701
19702  windows_path="$new_path"
19703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19704    unix_path=`$CYGPATH -u "$windows_path"`
19705    new_path="$unix_path"
19706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19708    new_path="$unix_path"
19709  fi
19710
19711
19712  # Now try to locate executable using which
19713  new_path=`$WHICH "$new_path" 2> /dev/null`
19714
19715  if test "x$new_path" = x; then
19716    # Oops. Which didn't find the executable.
19717    # The splitting of arguments from the executable at a space might have been incorrect,
19718    # since paths with space are more likely in Windows. Give it another try with the whole
19719    # argument.
19720    path="$complete"
19721    arguments="EOL"
19722    new_path="$path"
19723
19724  windows_path="$new_path"
19725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19726    unix_path=`$CYGPATH -u "$windows_path"`
19727    new_path="$unix_path"
19728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19730    new_path="$unix_path"
19731  fi
19732
19733
19734    new_path=`$WHICH "$new_path" 2> /dev/null`
19735    # bat and cmd files are not always considered executable in MSYS causing which
19736    # to not find them
19737    if test "x$new_path" = x \
19738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19740      new_path="$path"
19741
19742  windows_path="$new_path"
19743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19744    unix_path=`$CYGPATH -u "$windows_path"`
19745    new_path="$unix_path"
19746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19748    new_path="$unix_path"
19749  fi
19750
19751    fi
19752
19753    if test "x$new_path" = x; then
19754      # It's still not found. Now this is an unrecoverable error.
19755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19756$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19757      has_space=`$ECHO "$complete" | $GREP " "`
19758      if test "x$has_space" != x; then
19759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19761      fi
19762      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19763    fi
19764  fi
19765
19766  # Now new_path has a complete unix path to the binary
19767  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19768    # Keep paths in /bin as-is, but remove trailing .exe if any
19769    new_path="${new_path/%.exe/}"
19770    # Do not save /bin paths to all_fixpath_prefixes!
19771  else
19772    # Not in mixed or Windows style, start by that.
19773    new_path=`cmd //c echo $new_path`
19774
19775  input_path="$new_path"
19776  # Check if we need to convert this using DOS-style short mode. If the path
19777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19778  # take no chances and rewrite it.
19779  # Note: m4 eats our [], so we need to use [ and ] instead.
19780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19781  if test "x$has_forbidden_chars" != x; then
19782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19784  fi
19785
19786    # Output is in $new_path
19787
19788  windows_path="$new_path"
19789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19790    unix_path=`$CYGPATH -u "$windows_path"`
19791    new_path="$unix_path"
19792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19794    new_path="$unix_path"
19795  fi
19796
19797    # remove trailing .exe if any
19798    new_path="${new_path/%.exe/}"
19799
19800    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19801    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19802  fi
19803
19804    else
19805      # We're on a unix platform. Hooray! :)
19806      # First separate the path from the arguments. This will split at the first
19807      # space.
19808      complete="$FOUND_MAKE"
19809      path="${complete%% *}"
19810      tmp="$complete EOL"
19811      arguments="${tmp#* }"
19812
19813      # Cannot rely on the command "which" here since it doesn't always work.
19814      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19815      if test -z "$is_absolute_path"; then
19816        # Path to executable is not absolute. Find it.
19817        IFS_save="$IFS"
19818        IFS=:
19819        for p in $PATH; do
19820          if test -f "$p/$path" && test -x "$p/$path"; then
19821            new_path="$p/$path"
19822            break
19823          fi
19824        done
19825        IFS="$IFS_save"
19826      else
19827        # This is an absolute path, we can use it without further modifications.
19828        new_path="$path"
19829      fi
19830
19831      if test "x$new_path" = x; then
19832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19834        has_space=`$ECHO "$complete" | $GREP " "`
19835        if test "x$has_space" != x; then
19836          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19838        fi
19839        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19840      fi
19841    fi
19842
19843    # Now join together the path and the arguments once again
19844    if test "x$arguments" != xEOL; then
19845      new_complete="$new_path ${arguments% *}"
19846    else
19847      new_complete="$new_path"
19848    fi
19849
19850    if test "x$complete" != "x$new_complete"; then
19851      FOUND_MAKE="$new_complete"
19852      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19853$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19854    fi
19855  fi
19856
19857        fi
19858      fi
19859    fi
19860  fi
19861
19862        fi
19863        PATH=$OLD_PATH
19864      fi
19865    fi
19866
19867    if test "x$FOUND_MAKE" = x; then
19868      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
19869    fi
19870
19871    else
19872      # If it succeeded, then it was overridden by the user. We will use it
19873      # for the tool.
19874
19875      # First remove it from the list of overridden variables, so we can test
19876      # for unknown variables in the end.
19877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19878
19879      # Check if we try to supply an empty value
19880      if test "x$MAKE" = x; then
19881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19882$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19884$as_echo_n "checking for MAKE... " >&6; }
19885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19886$as_echo "disabled" >&6; }
19887      else
19888        # Check if the provided tool contains a complete path.
19889        tool_specified="$MAKE"
19890        tool_basename="${tool_specified##*/}"
19891        if test "x$tool_basename" = "x$tool_specified"; then
19892          # A command without a complete path is provided, search $PATH.
19893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19894$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19895          # Extract the first word of "$tool_basename", so it can be a program name with args.
19896set dummy $tool_basename; ac_word=$2
19897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19898$as_echo_n "checking for $ac_word... " >&6; }
19899if ${ac_cv_path_MAKE+:} false; then :
19900  $as_echo_n "(cached) " >&6
19901else
19902  case $MAKE in
19903  [\\/]* | ?:[\\/]*)
19904  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19905  ;;
19906  *)
19907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19908for as_dir in $PATH
19909do
19910  IFS=$as_save_IFS
19911  test -z "$as_dir" && as_dir=.
19912    for ac_exec_ext in '' $ac_executable_extensions; do
19913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19914    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19916    break 2
19917  fi
19918done
19919  done
19920IFS=$as_save_IFS
19921
19922  ;;
19923esac
19924fi
19925MAKE=$ac_cv_path_MAKE
19926if test -n "$MAKE"; then
19927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19928$as_echo "$MAKE" >&6; }
19929else
19930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19931$as_echo "no" >&6; }
19932fi
19933
19934
19935          if test "x$MAKE" = x; then
19936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19937          fi
19938        else
19939          # Otherwise we believe it is a complete path. Use it as it is.
19940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19941$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19943$as_echo_n "checking for MAKE... " >&6; }
19944          if test ! -x "$tool_specified"; then
19945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19946$as_echo "not found" >&6; }
19947            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19948          fi
19949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19950$as_echo "$tool_specified" >&6; }
19951        fi
19952      fi
19953    fi
19954
19955    # If MAKE was set by user, verify the version
19956
19957  MAKE_CANDIDATE=""$MAKE""
19958  DESCRIPTION="user supplied MAKE=$MAKE"
19959
19960  # On Cygwin, we require a newer version of make than on other platforms
19961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962    MAKE_VERSION_EXPR="-e 4\."
19963    MAKE_REQUIRED_VERSION="4.0"
19964   else
19965    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19966    MAKE_REQUIRED_VERSION="3.81"
19967  fi
19968
19969  if test "x$MAKE_CANDIDATE" != x; then
19970    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19971$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19972    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19973    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19974    if test "x$IS_GNU_MAKE" = x; then
19975      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19976$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19977    else
19978      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19979      if test "x$IS_MODERN_MAKE" = x; then
19980        { $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
19981$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;}
19982      else
19983        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19984          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19985            MAKE_EXPECTED_ENV='cygwin'
19986          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19987            MAKE_EXPECTED_ENV='msys'
19988          else
19989            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19990          fi
19991          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19992          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19993        else
19994          # Not relevant for non-Windows
19995          IS_MAKE_CORRECT_ENV=true
19996        fi
19997        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19998          { $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
19999$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;}
20000        else
20001          FOUND_MAKE=$MAKE_CANDIDATE
20002
20003  # Only process if variable expands to non-empty
20004
20005  if test "x$FOUND_MAKE" != x; then
20006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20007
20008  # First separate the path from the arguments. This will split at the first
20009  # space.
20010  complete="$FOUND_MAKE"
20011  path="${complete%% *}"
20012  tmp="$complete EOL"
20013  arguments="${tmp#* }"
20014
20015  # Input might be given as Windows format, start by converting to
20016  # unix format.
20017  new_path=`$CYGPATH -u "$path"`
20018
20019  # Now try to locate executable using which
20020  new_path=`$WHICH "$new_path" 2> /dev/null`
20021  # bat and cmd files are not always considered executable in cygwin causing which
20022  # to not find them
20023  if test "x$new_path" = x \
20024      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20025      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20026    new_path=`$CYGPATH -u "$path"`
20027  fi
20028  if test "x$new_path" = x; then
20029    # Oops. Which didn't find the executable.
20030    # The splitting of arguments from the executable at a space might have been incorrect,
20031    # since paths with space are more likely in Windows. Give it another try with the whole
20032    # argument.
20033    path="$complete"
20034    arguments="EOL"
20035    new_path=`$CYGPATH -u "$path"`
20036    new_path=`$WHICH "$new_path" 2> /dev/null`
20037    # bat and cmd files are not always considered executable in cygwin causing which
20038    # to not find them
20039    if test "x$new_path" = x \
20040        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20041        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20042      new_path=`$CYGPATH -u "$path"`
20043    fi
20044    if test "x$new_path" = x; then
20045      # It's still not found. Now this is an unrecoverable error.
20046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20047$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20048      has_space=`$ECHO "$complete" | $GREP " "`
20049      if test "x$has_space" != x; then
20050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20052      fi
20053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20054    fi
20055  fi
20056
20057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20060  # "foo.exe" is OK but "foo" is an error.
20061  #
20062  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20063  # It is also a way to make sure we got the proper file name for the real test later on.
20064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20065  if test "x$test_shortpath" = x; then
20066    # Short path failed, file does not exist as specified.
20067    # Try adding .exe or .cmd
20068    if test -f "${new_path}.exe"; then
20069      input_to_shortpath="${new_path}.exe"
20070    elif test -f "${new_path}.cmd"; then
20071      input_to_shortpath="${new_path}.cmd"
20072    else
20073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20074$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20075      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20076$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20077      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20078    fi
20079  else
20080    input_to_shortpath="$new_path"
20081  fi
20082
20083  # Call helper function which possibly converts this using DOS-style short mode.
20084  # If so, the updated path is stored in $new_path.
20085  new_path="$input_to_shortpath"
20086
20087  input_path="$input_to_shortpath"
20088  # Check if we need to convert this using DOS-style short mode. If the path
20089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20090  # take no chances and rewrite it.
20091  # Note: m4 eats our [], so we need to use [ and ] instead.
20092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20093  if test "x$has_forbidden_chars" != x; then
20094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20098      # Going to short mode and back again did indeed matter. Since short mode is
20099      # case insensitive, let's make it lowercase to improve readability.
20100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20101      # Now convert it back to Unix-style (cygpath)
20102      input_path=`$CYGPATH -u "$shortmode_path"`
20103      new_path="$input_path"
20104    fi
20105  fi
20106
20107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20108  if test "x$test_cygdrive_prefix" = x; then
20109    # As a simple fix, exclude /usr/bin since it's not a real path.
20110    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20112      # a path prefixed by /cygdrive for fixpath to work.
20113      new_path="$CYGWIN_ROOT_PATH$input_path"
20114    fi
20115  fi
20116
20117  # remove trailing .exe if any
20118  new_path="${new_path/%.exe/}"
20119
20120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20121
20122  # First separate the path from the arguments. This will split at the first
20123  # space.
20124  complete="$FOUND_MAKE"
20125  path="${complete%% *}"
20126  tmp="$complete EOL"
20127  arguments="${tmp#* }"
20128
20129  # Input might be given as Windows format, start by converting to
20130  # unix format.
20131  new_path="$path"
20132
20133  windows_path="$new_path"
20134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20135    unix_path=`$CYGPATH -u "$windows_path"`
20136    new_path="$unix_path"
20137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20139    new_path="$unix_path"
20140  fi
20141
20142
20143  # Now try to locate executable using which
20144  new_path=`$WHICH "$new_path" 2> /dev/null`
20145
20146  if test "x$new_path" = x; then
20147    # Oops. Which didn't find the executable.
20148    # The splitting of arguments from the executable at a space might have been incorrect,
20149    # since paths with space are more likely in Windows. Give it another try with the whole
20150    # argument.
20151    path="$complete"
20152    arguments="EOL"
20153    new_path="$path"
20154
20155  windows_path="$new_path"
20156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20157    unix_path=`$CYGPATH -u "$windows_path"`
20158    new_path="$unix_path"
20159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20161    new_path="$unix_path"
20162  fi
20163
20164
20165    new_path=`$WHICH "$new_path" 2> /dev/null`
20166    # bat and cmd files are not always considered executable in MSYS causing which
20167    # to not find them
20168    if test "x$new_path" = x \
20169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20171      new_path="$path"
20172
20173  windows_path="$new_path"
20174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20175    unix_path=`$CYGPATH -u "$windows_path"`
20176    new_path="$unix_path"
20177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20179    new_path="$unix_path"
20180  fi
20181
20182    fi
20183
20184    if test "x$new_path" = x; then
20185      # It's still not found. Now this is an unrecoverable error.
20186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20187$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20188      has_space=`$ECHO "$complete" | $GREP " "`
20189      if test "x$has_space" != x; then
20190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20192      fi
20193      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20194    fi
20195  fi
20196
20197  # Now new_path has a complete unix path to the binary
20198  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20199    # Keep paths in /bin as-is, but remove trailing .exe if any
20200    new_path="${new_path/%.exe/}"
20201    # Do not save /bin paths to all_fixpath_prefixes!
20202  else
20203    # Not in mixed or Windows style, start by that.
20204    new_path=`cmd //c echo $new_path`
20205
20206  input_path="$new_path"
20207  # Check if we need to convert this using DOS-style short mode. If the path
20208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20209  # take no chances and rewrite it.
20210  # Note: m4 eats our [], so we need to use [ and ] instead.
20211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20212  if test "x$has_forbidden_chars" != x; then
20213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20215  fi
20216
20217    # Output is in $new_path
20218
20219  windows_path="$new_path"
20220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20221    unix_path=`$CYGPATH -u "$windows_path"`
20222    new_path="$unix_path"
20223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20225    new_path="$unix_path"
20226  fi
20227
20228    # remove trailing .exe if any
20229    new_path="${new_path/%.exe/}"
20230
20231    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20232    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20233  fi
20234
20235    else
20236      # We're on a unix platform. Hooray! :)
20237      # First separate the path from the arguments. This will split at the first
20238      # space.
20239      complete="$FOUND_MAKE"
20240      path="${complete%% *}"
20241      tmp="$complete EOL"
20242      arguments="${tmp#* }"
20243
20244      # Cannot rely on the command "which" here since it doesn't always work.
20245      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20246      if test -z "$is_absolute_path"; then
20247        # Path to executable is not absolute. Find it.
20248        IFS_save="$IFS"
20249        IFS=:
20250        for p in $PATH; do
20251          if test -f "$p/$path" && test -x "$p/$path"; then
20252            new_path="$p/$path"
20253            break
20254          fi
20255        done
20256        IFS="$IFS_save"
20257      else
20258        # This is an absolute path, we can use it without further modifications.
20259        new_path="$path"
20260      fi
20261
20262      if test "x$new_path" = x; then
20263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20264$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20265        has_space=`$ECHO "$complete" | $GREP " "`
20266        if test "x$has_space" != x; then
20267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20269        fi
20270        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20271      fi
20272    fi
20273
20274    # Now join together the path and the arguments once again
20275    if test "x$arguments" != xEOL; then
20276      new_complete="$new_path ${arguments% *}"
20277    else
20278      new_complete="$new_path"
20279    fi
20280
20281    if test "x$complete" != "x$new_complete"; then
20282      FOUND_MAKE="$new_complete"
20283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20284$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20285    fi
20286  fi
20287
20288        fi
20289      fi
20290    fi
20291  fi
20292
20293    if test "x$FOUND_MAKE" = x; then
20294      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20295    fi
20296
20297  fi
20298
20299
20300  MAKE=$FOUND_MAKE
20301
20302  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20303$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20304
20305
20306  # Check if make supports the output sync option and if so, setup using it.
20307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20308$as_echo_n "checking if make --output-sync is supported... " >&6; }
20309  if $MAKE --version -O > /dev/null 2>&1; then
20310    OUTPUT_SYNC_SUPPORTED=true
20311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20312$as_echo "yes" >&6; }
20313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20314$as_echo_n "checking for output-sync value... " >&6; }
20315
20316# Check whether --with-output-sync was given.
20317if test "${with_output_sync+set}" = set; then :
20318  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20319fi
20320
20321    if test "x$OUTPUT_SYNC" = "x"; then
20322      OUTPUT_SYNC=none
20323    fi
20324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20325$as_echo "$OUTPUT_SYNC" >&6; }
20326    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20327      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20328    fi
20329  else
20330    OUTPUT_SYNC_SUPPORTED=false
20331    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20332$as_echo "no" >&6; }
20333  fi
20334
20335
20336
20337
20338
20339
20340  # Test if find supports -delete
20341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20342$as_echo_n "checking if find supports -delete... " >&6; }
20343  FIND_DELETE="-delete"
20344
20345  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20346
20347  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20348
20349  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20350  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20351    # No, it does not.
20352    rm $DELETEDIR/TestIfFindSupportsDelete
20353    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20354      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20355      FIND_DELETE="-print | xargs rm"
20356    else
20357      FIND_DELETE="-exec rm \{\} \+"
20358    fi
20359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20360$as_echo "no" >&6; }
20361  else
20362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20363$as_echo "yes" >&6; }
20364  fi
20365  rmdir $DELETEDIR
20366
20367
20368
20369  # These tools might not be installed by default,
20370  # need hint on how to install them.
20371
20372
20373
20374  # Publish this variable in the help.
20375
20376
20377  if [ -z "${UNZIP+x}" ]; then
20378    # The variable is not set by user, try to locate tool using the code snippet
20379    for ac_prog in unzip
20380do
20381  # Extract the first word of "$ac_prog", so it can be a program name with args.
20382set dummy $ac_prog; ac_word=$2
20383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20384$as_echo_n "checking for $ac_word... " >&6; }
20385if ${ac_cv_path_UNZIP+:} false; then :
20386  $as_echo_n "(cached) " >&6
20387else
20388  case $UNZIP in
20389  [\\/]* | ?:[\\/]*)
20390  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20391  ;;
20392  *)
20393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20394for as_dir in $PATH
20395do
20396  IFS=$as_save_IFS
20397  test -z "$as_dir" && as_dir=.
20398    for ac_exec_ext in '' $ac_executable_extensions; do
20399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20400    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20402    break 2
20403  fi
20404done
20405  done
20406IFS=$as_save_IFS
20407
20408  ;;
20409esac
20410fi
20411UNZIP=$ac_cv_path_UNZIP
20412if test -n "$UNZIP"; then
20413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20414$as_echo "$UNZIP" >&6; }
20415else
20416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20417$as_echo "no" >&6; }
20418fi
20419
20420
20421  test -n "$UNZIP" && break
20422done
20423
20424  else
20425    # The variable is set, but is it from the command line or the environment?
20426
20427    # Try to remove the string !UNZIP! from our list.
20428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20430      # If it failed, the variable was not from the command line. Ignore it,
20431      # but warn the user (except for BASH, which is always set by the calling BASH).
20432      if test "xUNZIP" != xBASH; then
20433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20434$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20435      fi
20436      # Try to locate tool using the code snippet
20437      for ac_prog in unzip
20438do
20439  # Extract the first word of "$ac_prog", so it can be a program name with args.
20440set dummy $ac_prog; ac_word=$2
20441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20442$as_echo_n "checking for $ac_word... " >&6; }
20443if ${ac_cv_path_UNZIP+:} false; then :
20444  $as_echo_n "(cached) " >&6
20445else
20446  case $UNZIP in
20447  [\\/]* | ?:[\\/]*)
20448  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20449  ;;
20450  *)
20451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20452for as_dir in $PATH
20453do
20454  IFS=$as_save_IFS
20455  test -z "$as_dir" && as_dir=.
20456    for ac_exec_ext in '' $ac_executable_extensions; do
20457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20458    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20460    break 2
20461  fi
20462done
20463  done
20464IFS=$as_save_IFS
20465
20466  ;;
20467esac
20468fi
20469UNZIP=$ac_cv_path_UNZIP
20470if test -n "$UNZIP"; then
20471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20472$as_echo "$UNZIP" >&6; }
20473else
20474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20475$as_echo "no" >&6; }
20476fi
20477
20478
20479  test -n "$UNZIP" && break
20480done
20481
20482    else
20483      # If it succeeded, then it was overridden by the user. We will use it
20484      # for the tool.
20485
20486      # First remove it from the list of overridden variables, so we can test
20487      # for unknown variables in the end.
20488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20489
20490      # Check if we try to supply an empty value
20491      if test "x$UNZIP" = x; then
20492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20493$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20495$as_echo_n "checking for UNZIP... " >&6; }
20496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20497$as_echo "disabled" >&6; }
20498      else
20499        # Check if the provided tool contains a complete path.
20500        tool_specified="$UNZIP"
20501        tool_basename="${tool_specified##*/}"
20502        if test "x$tool_basename" = "x$tool_specified"; then
20503          # A command without a complete path is provided, search $PATH.
20504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20505$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20506          # Extract the first word of "$tool_basename", so it can be a program name with args.
20507set dummy $tool_basename; ac_word=$2
20508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20509$as_echo_n "checking for $ac_word... " >&6; }
20510if ${ac_cv_path_UNZIP+:} false; then :
20511  $as_echo_n "(cached) " >&6
20512else
20513  case $UNZIP in
20514  [\\/]* | ?:[\\/]*)
20515  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20516  ;;
20517  *)
20518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20519for as_dir in $PATH
20520do
20521  IFS=$as_save_IFS
20522  test -z "$as_dir" && as_dir=.
20523    for ac_exec_ext in '' $ac_executable_extensions; do
20524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20525    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20527    break 2
20528  fi
20529done
20530  done
20531IFS=$as_save_IFS
20532
20533  ;;
20534esac
20535fi
20536UNZIP=$ac_cv_path_UNZIP
20537if test -n "$UNZIP"; then
20538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20539$as_echo "$UNZIP" >&6; }
20540else
20541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20542$as_echo "no" >&6; }
20543fi
20544
20545
20546          if test "x$UNZIP" = x; then
20547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20548          fi
20549        else
20550          # Otherwise we believe it is a complete path. Use it as it is.
20551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20552$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20554$as_echo_n "checking for UNZIP... " >&6; }
20555          if test ! -x "$tool_specified"; then
20556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20557$as_echo "not found" >&6; }
20558            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20559          fi
20560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20561$as_echo "$tool_specified" >&6; }
20562        fi
20563      fi
20564    fi
20565
20566  fi
20567
20568
20569
20570  if test "x$UNZIP" = x; then
20571    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20572  fi
20573
20574
20575
20576
20577
20578  # Publish this variable in the help.
20579
20580
20581  if [ -z "${ZIP+x}" ]; then
20582    # The variable is not set by user, try to locate tool using the code snippet
20583    for ac_prog in zip
20584do
20585  # Extract the first word of "$ac_prog", so it can be a program name with args.
20586set dummy $ac_prog; ac_word=$2
20587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20588$as_echo_n "checking for $ac_word... " >&6; }
20589if ${ac_cv_path_ZIP+:} false; then :
20590  $as_echo_n "(cached) " >&6
20591else
20592  case $ZIP in
20593  [\\/]* | ?:[\\/]*)
20594  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20595  ;;
20596  *)
20597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20598for as_dir in $PATH
20599do
20600  IFS=$as_save_IFS
20601  test -z "$as_dir" && as_dir=.
20602    for ac_exec_ext in '' $ac_executable_extensions; do
20603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20604    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20606    break 2
20607  fi
20608done
20609  done
20610IFS=$as_save_IFS
20611
20612  ;;
20613esac
20614fi
20615ZIP=$ac_cv_path_ZIP
20616if test -n "$ZIP"; then
20617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20618$as_echo "$ZIP" >&6; }
20619else
20620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20621$as_echo "no" >&6; }
20622fi
20623
20624
20625  test -n "$ZIP" && break
20626done
20627
20628  else
20629    # The variable is set, but is it from the command line or the environment?
20630
20631    # Try to remove the string !ZIP! from our list.
20632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20634      # If it failed, the variable was not from the command line. Ignore it,
20635      # but warn the user (except for BASH, which is always set by the calling BASH).
20636      if test "xZIP" != xBASH; then
20637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20638$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20639      fi
20640      # Try to locate tool using the code snippet
20641      for ac_prog in zip
20642do
20643  # Extract the first word of "$ac_prog", so it can be a program name with args.
20644set dummy $ac_prog; ac_word=$2
20645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20646$as_echo_n "checking for $ac_word... " >&6; }
20647if ${ac_cv_path_ZIP+:} false; then :
20648  $as_echo_n "(cached) " >&6
20649else
20650  case $ZIP in
20651  [\\/]* | ?:[\\/]*)
20652  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20653  ;;
20654  *)
20655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20656for as_dir in $PATH
20657do
20658  IFS=$as_save_IFS
20659  test -z "$as_dir" && as_dir=.
20660    for ac_exec_ext in '' $ac_executable_extensions; do
20661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20662    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20664    break 2
20665  fi
20666done
20667  done
20668IFS=$as_save_IFS
20669
20670  ;;
20671esac
20672fi
20673ZIP=$ac_cv_path_ZIP
20674if test -n "$ZIP"; then
20675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20676$as_echo "$ZIP" >&6; }
20677else
20678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20679$as_echo "no" >&6; }
20680fi
20681
20682
20683  test -n "$ZIP" && break
20684done
20685
20686    else
20687      # If it succeeded, then it was overridden by the user. We will use it
20688      # for the tool.
20689
20690      # First remove it from the list of overridden variables, so we can test
20691      # for unknown variables in the end.
20692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20693
20694      # Check if we try to supply an empty value
20695      if test "x$ZIP" = x; then
20696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20697$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20699$as_echo_n "checking for ZIP... " >&6; }
20700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20701$as_echo "disabled" >&6; }
20702      else
20703        # Check if the provided tool contains a complete path.
20704        tool_specified="$ZIP"
20705        tool_basename="${tool_specified##*/}"
20706        if test "x$tool_basename" = "x$tool_specified"; then
20707          # A command without a complete path is provided, search $PATH.
20708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20709$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20710          # Extract the first word of "$tool_basename", so it can be a program name with args.
20711set dummy $tool_basename; ac_word=$2
20712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20713$as_echo_n "checking for $ac_word... " >&6; }
20714if ${ac_cv_path_ZIP+:} false; then :
20715  $as_echo_n "(cached) " >&6
20716else
20717  case $ZIP in
20718  [\\/]* | ?:[\\/]*)
20719  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20720  ;;
20721  *)
20722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20723for as_dir in $PATH
20724do
20725  IFS=$as_save_IFS
20726  test -z "$as_dir" && as_dir=.
20727    for ac_exec_ext in '' $ac_executable_extensions; do
20728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20729    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20731    break 2
20732  fi
20733done
20734  done
20735IFS=$as_save_IFS
20736
20737  ;;
20738esac
20739fi
20740ZIP=$ac_cv_path_ZIP
20741if test -n "$ZIP"; then
20742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20743$as_echo "$ZIP" >&6; }
20744else
20745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20746$as_echo "no" >&6; }
20747fi
20748
20749
20750          if test "x$ZIP" = x; then
20751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20752          fi
20753        else
20754          # Otherwise we believe it is a complete path. Use it as it is.
20755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20756$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20758$as_echo_n "checking for ZIP... " >&6; }
20759          if test ! -x "$tool_specified"; then
20760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20761$as_echo "not found" >&6; }
20762            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20763          fi
20764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20765$as_echo "$tool_specified" >&6; }
20766        fi
20767      fi
20768    fi
20769
20770  fi
20771
20772
20773
20774  if test "x$ZIP" = x; then
20775    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20776  fi
20777
20778
20779
20780  # Non-required basic tools
20781
20782
20783
20784  # Publish this variable in the help.
20785
20786
20787  if [ -z "${LDD+x}" ]; then
20788    # The variable is not set by user, try to locate tool using the code snippet
20789    for ac_prog in ldd
20790do
20791  # Extract the first word of "$ac_prog", so it can be a program name with args.
20792set dummy $ac_prog; ac_word=$2
20793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20794$as_echo_n "checking for $ac_word... " >&6; }
20795if ${ac_cv_path_LDD+:} false; then :
20796  $as_echo_n "(cached) " >&6
20797else
20798  case $LDD in
20799  [\\/]* | ?:[\\/]*)
20800  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20801  ;;
20802  *)
20803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20804for as_dir in $PATH
20805do
20806  IFS=$as_save_IFS
20807  test -z "$as_dir" && as_dir=.
20808    for ac_exec_ext in '' $ac_executable_extensions; do
20809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20810    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20812    break 2
20813  fi
20814done
20815  done
20816IFS=$as_save_IFS
20817
20818  ;;
20819esac
20820fi
20821LDD=$ac_cv_path_LDD
20822if test -n "$LDD"; then
20823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20824$as_echo "$LDD" >&6; }
20825else
20826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20827$as_echo "no" >&6; }
20828fi
20829
20830
20831  test -n "$LDD" && break
20832done
20833
20834  else
20835    # The variable is set, but is it from the command line or the environment?
20836
20837    # Try to remove the string !LDD! from our list.
20838    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20839    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20840      # If it failed, the variable was not from the command line. Ignore it,
20841      # but warn the user (except for BASH, which is always set by the calling BASH).
20842      if test "xLDD" != xBASH; then
20843        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20844$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20845      fi
20846      # Try to locate tool using the code snippet
20847      for ac_prog in ldd
20848do
20849  # Extract the first word of "$ac_prog", so it can be a program name with args.
20850set dummy $ac_prog; ac_word=$2
20851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20852$as_echo_n "checking for $ac_word... " >&6; }
20853if ${ac_cv_path_LDD+:} false; then :
20854  $as_echo_n "(cached) " >&6
20855else
20856  case $LDD in
20857  [\\/]* | ?:[\\/]*)
20858  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20859  ;;
20860  *)
20861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20862for as_dir in $PATH
20863do
20864  IFS=$as_save_IFS
20865  test -z "$as_dir" && as_dir=.
20866    for ac_exec_ext in '' $ac_executable_extensions; do
20867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20868    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20870    break 2
20871  fi
20872done
20873  done
20874IFS=$as_save_IFS
20875
20876  ;;
20877esac
20878fi
20879LDD=$ac_cv_path_LDD
20880if test -n "$LDD"; then
20881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20882$as_echo "$LDD" >&6; }
20883else
20884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20885$as_echo "no" >&6; }
20886fi
20887
20888
20889  test -n "$LDD" && break
20890done
20891
20892    else
20893      # If it succeeded, then it was overridden by the user. We will use it
20894      # for the tool.
20895
20896      # First remove it from the list of overridden variables, so we can test
20897      # for unknown variables in the end.
20898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20899
20900      # Check if we try to supply an empty value
20901      if test "x$LDD" = x; then
20902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20903$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20905$as_echo_n "checking for LDD... " >&6; }
20906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20907$as_echo "disabled" >&6; }
20908      else
20909        # Check if the provided tool contains a complete path.
20910        tool_specified="$LDD"
20911        tool_basename="${tool_specified##*/}"
20912        if test "x$tool_basename" = "x$tool_specified"; then
20913          # A command without a complete path is provided, search $PATH.
20914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20915$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20916          # Extract the first word of "$tool_basename", so it can be a program name with args.
20917set dummy $tool_basename; ac_word=$2
20918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20919$as_echo_n "checking for $ac_word... " >&6; }
20920if ${ac_cv_path_LDD+:} false; then :
20921  $as_echo_n "(cached) " >&6
20922else
20923  case $LDD in
20924  [\\/]* | ?:[\\/]*)
20925  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20926  ;;
20927  *)
20928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20929for as_dir in $PATH
20930do
20931  IFS=$as_save_IFS
20932  test -z "$as_dir" && as_dir=.
20933    for ac_exec_ext in '' $ac_executable_extensions; do
20934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20935    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20937    break 2
20938  fi
20939done
20940  done
20941IFS=$as_save_IFS
20942
20943  ;;
20944esac
20945fi
20946LDD=$ac_cv_path_LDD
20947if test -n "$LDD"; then
20948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20949$as_echo "$LDD" >&6; }
20950else
20951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20952$as_echo "no" >&6; }
20953fi
20954
20955
20956          if test "x$LDD" = x; then
20957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20958          fi
20959        else
20960          # Otherwise we believe it is a complete path. Use it as it is.
20961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20962$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20964$as_echo_n "checking for LDD... " >&6; }
20965          if test ! -x "$tool_specified"; then
20966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20967$as_echo "not found" >&6; }
20968            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20969          fi
20970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20971$as_echo "$tool_specified" >&6; }
20972        fi
20973      fi
20974    fi
20975
20976  fi
20977
20978
20979  if test "x$LDD" = "x"; then
20980    # List shared lib dependencies is used for
20981    # debug output and checking for forbidden dependencies.
20982    # We can build without it.
20983    LDD="true"
20984  fi
20985
20986
20987  # Publish this variable in the help.
20988
20989
20990  if [ -z "${OTOOL+x}" ]; then
20991    # The variable is not set by user, try to locate tool using the code snippet
20992    for ac_prog in otool
20993do
20994  # Extract the first word of "$ac_prog", so it can be a program name with args.
20995set dummy $ac_prog; ac_word=$2
20996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20997$as_echo_n "checking for $ac_word... " >&6; }
20998if ${ac_cv_path_OTOOL+:} false; then :
20999  $as_echo_n "(cached) " >&6
21000else
21001  case $OTOOL in
21002  [\\/]* | ?:[\\/]*)
21003  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21004  ;;
21005  *)
21006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21007for as_dir in $PATH
21008do
21009  IFS=$as_save_IFS
21010  test -z "$as_dir" && as_dir=.
21011    for ac_exec_ext in '' $ac_executable_extensions; do
21012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21013    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21015    break 2
21016  fi
21017done
21018  done
21019IFS=$as_save_IFS
21020
21021  ;;
21022esac
21023fi
21024OTOOL=$ac_cv_path_OTOOL
21025if test -n "$OTOOL"; then
21026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21027$as_echo "$OTOOL" >&6; }
21028else
21029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21030$as_echo "no" >&6; }
21031fi
21032
21033
21034  test -n "$OTOOL" && break
21035done
21036
21037  else
21038    # The variable is set, but is it from the command line or the environment?
21039
21040    # Try to remove the string !OTOOL! from our list.
21041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21043      # If it failed, the variable was not from the command line. Ignore it,
21044      # but warn the user (except for BASH, which is always set by the calling BASH).
21045      if test "xOTOOL" != xBASH; then
21046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21047$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21048      fi
21049      # Try to locate tool using the code snippet
21050      for ac_prog in otool
21051do
21052  # Extract the first word of "$ac_prog", so it can be a program name with args.
21053set dummy $ac_prog; ac_word=$2
21054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21055$as_echo_n "checking for $ac_word... " >&6; }
21056if ${ac_cv_path_OTOOL+:} false; then :
21057  $as_echo_n "(cached) " >&6
21058else
21059  case $OTOOL in
21060  [\\/]* | ?:[\\/]*)
21061  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21062  ;;
21063  *)
21064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21065for as_dir in $PATH
21066do
21067  IFS=$as_save_IFS
21068  test -z "$as_dir" && as_dir=.
21069    for ac_exec_ext in '' $ac_executable_extensions; do
21070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21071    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21073    break 2
21074  fi
21075done
21076  done
21077IFS=$as_save_IFS
21078
21079  ;;
21080esac
21081fi
21082OTOOL=$ac_cv_path_OTOOL
21083if test -n "$OTOOL"; then
21084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21085$as_echo "$OTOOL" >&6; }
21086else
21087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21088$as_echo "no" >&6; }
21089fi
21090
21091
21092  test -n "$OTOOL" && break
21093done
21094
21095    else
21096      # If it succeeded, then it was overridden by the user. We will use it
21097      # for the tool.
21098
21099      # First remove it from the list of overridden variables, so we can test
21100      # for unknown variables in the end.
21101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21102
21103      # Check if we try to supply an empty value
21104      if test "x$OTOOL" = x; then
21105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21106$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21108$as_echo_n "checking for OTOOL... " >&6; }
21109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21110$as_echo "disabled" >&6; }
21111      else
21112        # Check if the provided tool contains a complete path.
21113        tool_specified="$OTOOL"
21114        tool_basename="${tool_specified##*/}"
21115        if test "x$tool_basename" = "x$tool_specified"; then
21116          # A command without a complete path is provided, search $PATH.
21117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21118$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21119          # Extract the first word of "$tool_basename", so it can be a program name with args.
21120set dummy $tool_basename; ac_word=$2
21121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21122$as_echo_n "checking for $ac_word... " >&6; }
21123if ${ac_cv_path_OTOOL+:} false; then :
21124  $as_echo_n "(cached) " >&6
21125else
21126  case $OTOOL in
21127  [\\/]* | ?:[\\/]*)
21128  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21129  ;;
21130  *)
21131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21132for as_dir in $PATH
21133do
21134  IFS=$as_save_IFS
21135  test -z "$as_dir" && as_dir=.
21136    for ac_exec_ext in '' $ac_executable_extensions; do
21137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21138    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21140    break 2
21141  fi
21142done
21143  done
21144IFS=$as_save_IFS
21145
21146  ;;
21147esac
21148fi
21149OTOOL=$ac_cv_path_OTOOL
21150if test -n "$OTOOL"; then
21151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21152$as_echo "$OTOOL" >&6; }
21153else
21154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21155$as_echo "no" >&6; }
21156fi
21157
21158
21159          if test "x$OTOOL" = x; then
21160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21161          fi
21162        else
21163          # Otherwise we believe it is a complete path. Use it as it is.
21164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21165$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21167$as_echo_n "checking for OTOOL... " >&6; }
21168          if test ! -x "$tool_specified"; then
21169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21170$as_echo "not found" >&6; }
21171            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21172          fi
21173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21174$as_echo "$tool_specified" >&6; }
21175        fi
21176      fi
21177    fi
21178
21179  fi
21180
21181
21182  if test "x$OTOOL" = "x"; then
21183    OTOOL="true"
21184  fi
21185
21186
21187  # Publish this variable in the help.
21188
21189
21190  if [ -z "${READELF+x}" ]; then
21191    # The variable is not set by user, try to locate tool using the code snippet
21192    for ac_prog in greadelf readelf
21193do
21194  # Extract the first word of "$ac_prog", so it can be a program name with args.
21195set dummy $ac_prog; ac_word=$2
21196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21197$as_echo_n "checking for $ac_word... " >&6; }
21198if ${ac_cv_path_READELF+:} false; then :
21199  $as_echo_n "(cached) " >&6
21200else
21201  case $READELF in
21202  [\\/]* | ?:[\\/]*)
21203  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21204  ;;
21205  *)
21206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21207for as_dir in $PATH
21208do
21209  IFS=$as_save_IFS
21210  test -z "$as_dir" && as_dir=.
21211    for ac_exec_ext in '' $ac_executable_extensions; do
21212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21213    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21215    break 2
21216  fi
21217done
21218  done
21219IFS=$as_save_IFS
21220
21221  ;;
21222esac
21223fi
21224READELF=$ac_cv_path_READELF
21225if test -n "$READELF"; then
21226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21227$as_echo "$READELF" >&6; }
21228else
21229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21230$as_echo "no" >&6; }
21231fi
21232
21233
21234  test -n "$READELF" && break
21235done
21236
21237  else
21238    # The variable is set, but is it from the command line or the environment?
21239
21240    # Try to remove the string !READELF! from our list.
21241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21243      # If it failed, the variable was not from the command line. Ignore it,
21244      # but warn the user (except for BASH, which is always set by the calling BASH).
21245      if test "xREADELF" != xBASH; then
21246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21247$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21248      fi
21249      # Try to locate tool using the code snippet
21250      for ac_prog in greadelf readelf
21251do
21252  # Extract the first word of "$ac_prog", so it can be a program name with args.
21253set dummy $ac_prog; ac_word=$2
21254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21255$as_echo_n "checking for $ac_word... " >&6; }
21256if ${ac_cv_path_READELF+:} false; then :
21257  $as_echo_n "(cached) " >&6
21258else
21259  case $READELF in
21260  [\\/]* | ?:[\\/]*)
21261  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21262  ;;
21263  *)
21264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21265for as_dir in $PATH
21266do
21267  IFS=$as_save_IFS
21268  test -z "$as_dir" && as_dir=.
21269    for ac_exec_ext in '' $ac_executable_extensions; do
21270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21271    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21273    break 2
21274  fi
21275done
21276  done
21277IFS=$as_save_IFS
21278
21279  ;;
21280esac
21281fi
21282READELF=$ac_cv_path_READELF
21283if test -n "$READELF"; then
21284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21285$as_echo "$READELF" >&6; }
21286else
21287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21288$as_echo "no" >&6; }
21289fi
21290
21291
21292  test -n "$READELF" && break
21293done
21294
21295    else
21296      # If it succeeded, then it was overridden by the user. We will use it
21297      # for the tool.
21298
21299      # First remove it from the list of overridden variables, so we can test
21300      # for unknown variables in the end.
21301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21302
21303      # Check if we try to supply an empty value
21304      if test "x$READELF" = x; then
21305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21306$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21308$as_echo_n "checking for READELF... " >&6; }
21309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21310$as_echo "disabled" >&6; }
21311      else
21312        # Check if the provided tool contains a complete path.
21313        tool_specified="$READELF"
21314        tool_basename="${tool_specified##*/}"
21315        if test "x$tool_basename" = "x$tool_specified"; then
21316          # A command without a complete path is provided, search $PATH.
21317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21318$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21319          # Extract the first word of "$tool_basename", so it can be a program name with args.
21320set dummy $tool_basename; ac_word=$2
21321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21322$as_echo_n "checking for $ac_word... " >&6; }
21323if ${ac_cv_path_READELF+:} false; then :
21324  $as_echo_n "(cached) " >&6
21325else
21326  case $READELF in
21327  [\\/]* | ?:[\\/]*)
21328  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21329  ;;
21330  *)
21331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21332for as_dir in $PATH
21333do
21334  IFS=$as_save_IFS
21335  test -z "$as_dir" && as_dir=.
21336    for ac_exec_ext in '' $ac_executable_extensions; do
21337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21338    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21340    break 2
21341  fi
21342done
21343  done
21344IFS=$as_save_IFS
21345
21346  ;;
21347esac
21348fi
21349READELF=$ac_cv_path_READELF
21350if test -n "$READELF"; then
21351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21352$as_echo "$READELF" >&6; }
21353else
21354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21355$as_echo "no" >&6; }
21356fi
21357
21358
21359          if test "x$READELF" = x; then
21360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21361          fi
21362        else
21363          # Otherwise we believe it is a complete path. Use it as it is.
21364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21365$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21367$as_echo_n "checking for READELF... " >&6; }
21368          if test ! -x "$tool_specified"; then
21369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21370$as_echo "not found" >&6; }
21371            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21372          fi
21373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21374$as_echo "$tool_specified" >&6; }
21375        fi
21376      fi
21377    fi
21378
21379  fi
21380
21381
21382
21383
21384  # Publish this variable in the help.
21385
21386
21387  if [ -z "${HG+x}" ]; then
21388    # The variable is not set by user, try to locate tool using the code snippet
21389    for ac_prog in hg
21390do
21391  # Extract the first word of "$ac_prog", so it can be a program name with args.
21392set dummy $ac_prog; ac_word=$2
21393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21394$as_echo_n "checking for $ac_word... " >&6; }
21395if ${ac_cv_path_HG+:} false; then :
21396  $as_echo_n "(cached) " >&6
21397else
21398  case $HG in
21399  [\\/]* | ?:[\\/]*)
21400  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21401  ;;
21402  *)
21403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21404for as_dir in $PATH
21405do
21406  IFS=$as_save_IFS
21407  test -z "$as_dir" && as_dir=.
21408    for ac_exec_ext in '' $ac_executable_extensions; do
21409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21410    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21412    break 2
21413  fi
21414done
21415  done
21416IFS=$as_save_IFS
21417
21418  ;;
21419esac
21420fi
21421HG=$ac_cv_path_HG
21422if test -n "$HG"; then
21423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21424$as_echo "$HG" >&6; }
21425else
21426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21427$as_echo "no" >&6; }
21428fi
21429
21430
21431  test -n "$HG" && break
21432done
21433
21434  else
21435    # The variable is set, but is it from the command line or the environment?
21436
21437    # Try to remove the string !HG! from our list.
21438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21440      # If it failed, the variable was not from the command line. Ignore it,
21441      # but warn the user (except for BASH, which is always set by the calling BASH).
21442      if test "xHG" != xBASH; then
21443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21444$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21445      fi
21446      # Try to locate tool using the code snippet
21447      for ac_prog in hg
21448do
21449  # Extract the first word of "$ac_prog", so it can be a program name with args.
21450set dummy $ac_prog; ac_word=$2
21451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21452$as_echo_n "checking for $ac_word... " >&6; }
21453if ${ac_cv_path_HG+:} false; then :
21454  $as_echo_n "(cached) " >&6
21455else
21456  case $HG in
21457  [\\/]* | ?:[\\/]*)
21458  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21459  ;;
21460  *)
21461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21462for as_dir in $PATH
21463do
21464  IFS=$as_save_IFS
21465  test -z "$as_dir" && as_dir=.
21466    for ac_exec_ext in '' $ac_executable_extensions; do
21467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21468    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21470    break 2
21471  fi
21472done
21473  done
21474IFS=$as_save_IFS
21475
21476  ;;
21477esac
21478fi
21479HG=$ac_cv_path_HG
21480if test -n "$HG"; then
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21482$as_echo "$HG" >&6; }
21483else
21484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21485$as_echo "no" >&6; }
21486fi
21487
21488
21489  test -n "$HG" && break
21490done
21491
21492    else
21493      # If it succeeded, then it was overridden by the user. We will use it
21494      # for the tool.
21495
21496      # First remove it from the list of overridden variables, so we can test
21497      # for unknown variables in the end.
21498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21499
21500      # Check if we try to supply an empty value
21501      if test "x$HG" = x; then
21502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21503$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21505$as_echo_n "checking for HG... " >&6; }
21506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21507$as_echo "disabled" >&6; }
21508      else
21509        # Check if the provided tool contains a complete path.
21510        tool_specified="$HG"
21511        tool_basename="${tool_specified##*/}"
21512        if test "x$tool_basename" = "x$tool_specified"; then
21513          # A command without a complete path is provided, search $PATH.
21514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21515$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21516          # Extract the first word of "$tool_basename", so it can be a program name with args.
21517set dummy $tool_basename; ac_word=$2
21518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21519$as_echo_n "checking for $ac_word... " >&6; }
21520if ${ac_cv_path_HG+:} false; then :
21521  $as_echo_n "(cached) " >&6
21522else
21523  case $HG in
21524  [\\/]* | ?:[\\/]*)
21525  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21526  ;;
21527  *)
21528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21529for as_dir in $PATH
21530do
21531  IFS=$as_save_IFS
21532  test -z "$as_dir" && as_dir=.
21533    for ac_exec_ext in '' $ac_executable_extensions; do
21534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21535    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21537    break 2
21538  fi
21539done
21540  done
21541IFS=$as_save_IFS
21542
21543  ;;
21544esac
21545fi
21546HG=$ac_cv_path_HG
21547if test -n "$HG"; then
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21549$as_echo "$HG" >&6; }
21550else
21551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21552$as_echo "no" >&6; }
21553fi
21554
21555
21556          if test "x$HG" = x; then
21557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21558          fi
21559        else
21560          # Otherwise we believe it is a complete path. Use it as it is.
21561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21562$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21564$as_echo_n "checking for HG... " >&6; }
21565          if test ! -x "$tool_specified"; then
21566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21567$as_echo "not found" >&6; }
21568            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21569          fi
21570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21571$as_echo "$tool_specified" >&6; }
21572        fi
21573      fi
21574    fi
21575
21576  fi
21577
21578
21579
21580
21581  # Publish this variable in the help.
21582
21583
21584  if [ -z "${STAT+x}" ]; then
21585    # The variable is not set by user, try to locate tool using the code snippet
21586    for ac_prog in stat
21587do
21588  # Extract the first word of "$ac_prog", so it can be a program name with args.
21589set dummy $ac_prog; ac_word=$2
21590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21591$as_echo_n "checking for $ac_word... " >&6; }
21592if ${ac_cv_path_STAT+:} false; then :
21593  $as_echo_n "(cached) " >&6
21594else
21595  case $STAT in
21596  [\\/]* | ?:[\\/]*)
21597  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21598  ;;
21599  *)
21600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21601for as_dir in $PATH
21602do
21603  IFS=$as_save_IFS
21604  test -z "$as_dir" && as_dir=.
21605    for ac_exec_ext in '' $ac_executable_extensions; do
21606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21607    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21609    break 2
21610  fi
21611done
21612  done
21613IFS=$as_save_IFS
21614
21615  ;;
21616esac
21617fi
21618STAT=$ac_cv_path_STAT
21619if test -n "$STAT"; then
21620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21621$as_echo "$STAT" >&6; }
21622else
21623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21624$as_echo "no" >&6; }
21625fi
21626
21627
21628  test -n "$STAT" && break
21629done
21630
21631  else
21632    # The variable is set, but is it from the command line or the environment?
21633
21634    # Try to remove the string !STAT! from our list.
21635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21637      # If it failed, the variable was not from the command line. Ignore it,
21638      # but warn the user (except for BASH, which is always set by the calling BASH).
21639      if test "xSTAT" != xBASH; then
21640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21641$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21642      fi
21643      # Try to locate tool using the code snippet
21644      for ac_prog in stat
21645do
21646  # Extract the first word of "$ac_prog", so it can be a program name with args.
21647set dummy $ac_prog; ac_word=$2
21648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21649$as_echo_n "checking for $ac_word... " >&6; }
21650if ${ac_cv_path_STAT+:} false; then :
21651  $as_echo_n "(cached) " >&6
21652else
21653  case $STAT in
21654  [\\/]* | ?:[\\/]*)
21655  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21656  ;;
21657  *)
21658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21659for as_dir in $PATH
21660do
21661  IFS=$as_save_IFS
21662  test -z "$as_dir" && as_dir=.
21663    for ac_exec_ext in '' $ac_executable_extensions; do
21664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21665    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21667    break 2
21668  fi
21669done
21670  done
21671IFS=$as_save_IFS
21672
21673  ;;
21674esac
21675fi
21676STAT=$ac_cv_path_STAT
21677if test -n "$STAT"; then
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21679$as_echo "$STAT" >&6; }
21680else
21681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21682$as_echo "no" >&6; }
21683fi
21684
21685
21686  test -n "$STAT" && break
21687done
21688
21689    else
21690      # If it succeeded, then it was overridden by the user. We will use it
21691      # for the tool.
21692
21693      # First remove it from the list of overridden variables, so we can test
21694      # for unknown variables in the end.
21695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21696
21697      # Check if we try to supply an empty value
21698      if test "x$STAT" = x; then
21699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21700$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21702$as_echo_n "checking for STAT... " >&6; }
21703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21704$as_echo "disabled" >&6; }
21705      else
21706        # Check if the provided tool contains a complete path.
21707        tool_specified="$STAT"
21708        tool_basename="${tool_specified##*/}"
21709        if test "x$tool_basename" = "x$tool_specified"; then
21710          # A command without a complete path is provided, search $PATH.
21711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21712$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21713          # Extract the first word of "$tool_basename", so it can be a program name with args.
21714set dummy $tool_basename; ac_word=$2
21715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21716$as_echo_n "checking for $ac_word... " >&6; }
21717if ${ac_cv_path_STAT+:} false; then :
21718  $as_echo_n "(cached) " >&6
21719else
21720  case $STAT in
21721  [\\/]* | ?:[\\/]*)
21722  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21723  ;;
21724  *)
21725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21726for as_dir in $PATH
21727do
21728  IFS=$as_save_IFS
21729  test -z "$as_dir" && as_dir=.
21730    for ac_exec_ext in '' $ac_executable_extensions; do
21731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21732    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21734    break 2
21735  fi
21736done
21737  done
21738IFS=$as_save_IFS
21739
21740  ;;
21741esac
21742fi
21743STAT=$ac_cv_path_STAT
21744if test -n "$STAT"; then
21745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21746$as_echo "$STAT" >&6; }
21747else
21748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21749$as_echo "no" >&6; }
21750fi
21751
21752
21753          if test "x$STAT" = x; then
21754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21755          fi
21756        else
21757          # Otherwise we believe it is a complete path. Use it as it is.
21758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21759$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21761$as_echo_n "checking for STAT... " >&6; }
21762          if test ! -x "$tool_specified"; then
21763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21764$as_echo "not found" >&6; }
21765            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21766          fi
21767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21768$as_echo "$tool_specified" >&6; }
21769        fi
21770      fi
21771    fi
21772
21773  fi
21774
21775
21776
21777
21778  # Publish this variable in the help.
21779
21780
21781  if [ -z "${TIME+x}" ]; then
21782    # The variable is not set by user, try to locate tool using the code snippet
21783    for ac_prog in time
21784do
21785  # Extract the first word of "$ac_prog", so it can be a program name with args.
21786set dummy $ac_prog; ac_word=$2
21787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21788$as_echo_n "checking for $ac_word... " >&6; }
21789if ${ac_cv_path_TIME+:} false; then :
21790  $as_echo_n "(cached) " >&6
21791else
21792  case $TIME in
21793  [\\/]* | ?:[\\/]*)
21794  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21795  ;;
21796  *)
21797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21798for as_dir in $PATH
21799do
21800  IFS=$as_save_IFS
21801  test -z "$as_dir" && as_dir=.
21802    for ac_exec_ext in '' $ac_executable_extensions; do
21803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21804    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21806    break 2
21807  fi
21808done
21809  done
21810IFS=$as_save_IFS
21811
21812  ;;
21813esac
21814fi
21815TIME=$ac_cv_path_TIME
21816if test -n "$TIME"; then
21817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21818$as_echo "$TIME" >&6; }
21819else
21820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21821$as_echo "no" >&6; }
21822fi
21823
21824
21825  test -n "$TIME" && break
21826done
21827
21828  else
21829    # The variable is set, but is it from the command line or the environment?
21830
21831    # Try to remove the string !TIME! from our list.
21832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21834      # If it failed, the variable was not from the command line. Ignore it,
21835      # but warn the user (except for BASH, which is always set by the calling BASH).
21836      if test "xTIME" != xBASH; then
21837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21838$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21839      fi
21840      # Try to locate tool using the code snippet
21841      for ac_prog in time
21842do
21843  # Extract the first word of "$ac_prog", so it can be a program name with args.
21844set dummy $ac_prog; ac_word=$2
21845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21846$as_echo_n "checking for $ac_word... " >&6; }
21847if ${ac_cv_path_TIME+:} false; then :
21848  $as_echo_n "(cached) " >&6
21849else
21850  case $TIME in
21851  [\\/]* | ?:[\\/]*)
21852  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21853  ;;
21854  *)
21855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21856for as_dir in $PATH
21857do
21858  IFS=$as_save_IFS
21859  test -z "$as_dir" && as_dir=.
21860    for ac_exec_ext in '' $ac_executable_extensions; do
21861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21862    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21864    break 2
21865  fi
21866done
21867  done
21868IFS=$as_save_IFS
21869
21870  ;;
21871esac
21872fi
21873TIME=$ac_cv_path_TIME
21874if test -n "$TIME"; then
21875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21876$as_echo "$TIME" >&6; }
21877else
21878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21879$as_echo "no" >&6; }
21880fi
21881
21882
21883  test -n "$TIME" && break
21884done
21885
21886    else
21887      # If it succeeded, then it was overridden by the user. We will use it
21888      # for the tool.
21889
21890      # First remove it from the list of overridden variables, so we can test
21891      # for unknown variables in the end.
21892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21893
21894      # Check if we try to supply an empty value
21895      if test "x$TIME" = x; then
21896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21897$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21899$as_echo_n "checking for TIME... " >&6; }
21900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21901$as_echo "disabled" >&6; }
21902      else
21903        # Check if the provided tool contains a complete path.
21904        tool_specified="$TIME"
21905        tool_basename="${tool_specified##*/}"
21906        if test "x$tool_basename" = "x$tool_specified"; then
21907          # A command without a complete path is provided, search $PATH.
21908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21909$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21910          # Extract the first word of "$tool_basename", so it can be a program name with args.
21911set dummy $tool_basename; ac_word=$2
21912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21913$as_echo_n "checking for $ac_word... " >&6; }
21914if ${ac_cv_path_TIME+:} false; then :
21915  $as_echo_n "(cached) " >&6
21916else
21917  case $TIME in
21918  [\\/]* | ?:[\\/]*)
21919  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21920  ;;
21921  *)
21922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21923for as_dir in $PATH
21924do
21925  IFS=$as_save_IFS
21926  test -z "$as_dir" && as_dir=.
21927    for ac_exec_ext in '' $ac_executable_extensions; do
21928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21929    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21931    break 2
21932  fi
21933done
21934  done
21935IFS=$as_save_IFS
21936
21937  ;;
21938esac
21939fi
21940TIME=$ac_cv_path_TIME
21941if test -n "$TIME"; then
21942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21943$as_echo "$TIME" >&6; }
21944else
21945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21946$as_echo "no" >&6; }
21947fi
21948
21949
21950          if test "x$TIME" = x; then
21951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21952          fi
21953        else
21954          # Otherwise we believe it is a complete path. Use it as it is.
21955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21956$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21958$as_echo_n "checking for TIME... " >&6; }
21959          if test ! -x "$tool_specified"; then
21960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21961$as_echo "not found" >&6; }
21962            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21963          fi
21964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21965$as_echo "$tool_specified" >&6; }
21966        fi
21967      fi
21968    fi
21969
21970  fi
21971
21972
21973
21974
21975  # Publish this variable in the help.
21976
21977
21978  if [ -z "${PATCH+x}" ]; then
21979    # The variable is not set by user, try to locate tool using the code snippet
21980    for ac_prog in gpatch patch
21981do
21982  # Extract the first word of "$ac_prog", so it can be a program name with args.
21983set dummy $ac_prog; ac_word=$2
21984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21985$as_echo_n "checking for $ac_word... " >&6; }
21986if ${ac_cv_path_PATCH+:} false; then :
21987  $as_echo_n "(cached) " >&6
21988else
21989  case $PATCH in
21990  [\\/]* | ?:[\\/]*)
21991  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21992  ;;
21993  *)
21994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21995for as_dir in $PATH
21996do
21997  IFS=$as_save_IFS
21998  test -z "$as_dir" && as_dir=.
21999    for ac_exec_ext in '' $ac_executable_extensions; do
22000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22001    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22003    break 2
22004  fi
22005done
22006  done
22007IFS=$as_save_IFS
22008
22009  ;;
22010esac
22011fi
22012PATCH=$ac_cv_path_PATCH
22013if test -n "$PATCH"; then
22014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22015$as_echo "$PATCH" >&6; }
22016else
22017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22018$as_echo "no" >&6; }
22019fi
22020
22021
22022  test -n "$PATCH" && break
22023done
22024
22025  else
22026    # The variable is set, but is it from the command line or the environment?
22027
22028    # Try to remove the string !PATCH! from our list.
22029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22031      # If it failed, the variable was not from the command line. Ignore it,
22032      # but warn the user (except for BASH, which is always set by the calling BASH).
22033      if test "xPATCH" != xBASH; then
22034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22035$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22036      fi
22037      # Try to locate tool using the code snippet
22038      for ac_prog in gpatch patch
22039do
22040  # Extract the first word of "$ac_prog", so it can be a program name with args.
22041set dummy $ac_prog; ac_word=$2
22042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22043$as_echo_n "checking for $ac_word... " >&6; }
22044if ${ac_cv_path_PATCH+:} false; then :
22045  $as_echo_n "(cached) " >&6
22046else
22047  case $PATCH in
22048  [\\/]* | ?:[\\/]*)
22049  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22050  ;;
22051  *)
22052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22053for as_dir in $PATH
22054do
22055  IFS=$as_save_IFS
22056  test -z "$as_dir" && as_dir=.
22057    for ac_exec_ext in '' $ac_executable_extensions; do
22058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22059    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22061    break 2
22062  fi
22063done
22064  done
22065IFS=$as_save_IFS
22066
22067  ;;
22068esac
22069fi
22070PATCH=$ac_cv_path_PATCH
22071if test -n "$PATCH"; then
22072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22073$as_echo "$PATCH" >&6; }
22074else
22075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22076$as_echo "no" >&6; }
22077fi
22078
22079
22080  test -n "$PATCH" && break
22081done
22082
22083    else
22084      # If it succeeded, then it was overridden by the user. We will use it
22085      # for the tool.
22086
22087      # First remove it from the list of overridden variables, so we can test
22088      # for unknown variables in the end.
22089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22090
22091      # Check if we try to supply an empty value
22092      if test "x$PATCH" = x; then
22093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22094$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22096$as_echo_n "checking for PATCH... " >&6; }
22097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22098$as_echo "disabled" >&6; }
22099      else
22100        # Check if the provided tool contains a complete path.
22101        tool_specified="$PATCH"
22102        tool_basename="${tool_specified##*/}"
22103        if test "x$tool_basename" = "x$tool_specified"; then
22104          # A command without a complete path is provided, search $PATH.
22105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22106$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22107          # Extract the first word of "$tool_basename", so it can be a program name with args.
22108set dummy $tool_basename; ac_word=$2
22109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22110$as_echo_n "checking for $ac_word... " >&6; }
22111if ${ac_cv_path_PATCH+:} false; then :
22112  $as_echo_n "(cached) " >&6
22113else
22114  case $PATCH in
22115  [\\/]* | ?:[\\/]*)
22116  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22117  ;;
22118  *)
22119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22120for as_dir in $PATH
22121do
22122  IFS=$as_save_IFS
22123  test -z "$as_dir" && as_dir=.
22124    for ac_exec_ext in '' $ac_executable_extensions; do
22125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22126    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22128    break 2
22129  fi
22130done
22131  done
22132IFS=$as_save_IFS
22133
22134  ;;
22135esac
22136fi
22137PATCH=$ac_cv_path_PATCH
22138if test -n "$PATCH"; then
22139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22140$as_echo "$PATCH" >&6; }
22141else
22142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22143$as_echo "no" >&6; }
22144fi
22145
22146
22147          if test "x$PATCH" = x; then
22148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22149          fi
22150        else
22151          # Otherwise we believe it is a complete path. Use it as it is.
22152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22153$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22155$as_echo_n "checking for PATCH... " >&6; }
22156          if test ! -x "$tool_specified"; then
22157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22158$as_echo "not found" >&6; }
22159            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22160          fi
22161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22162$as_echo "$tool_specified" >&6; }
22163        fi
22164      fi
22165    fi
22166
22167  fi
22168
22169
22170  # Check if it's GNU time
22171  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22172  if test "x$IS_GNU_TIME" != x; then
22173    IS_GNU_TIME=yes
22174  else
22175    IS_GNU_TIME=no
22176  fi
22177
22178
22179  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22180
22181
22182
22183  # Publish this variable in the help.
22184
22185
22186  if [ -z "${DSYMUTIL+x}" ]; then
22187    # The variable is not set by user, try to locate tool using the code snippet
22188    for ac_prog in dsymutil
22189do
22190  # Extract the first word of "$ac_prog", so it can be a program name with args.
22191set dummy $ac_prog; ac_word=$2
22192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22193$as_echo_n "checking for $ac_word... " >&6; }
22194if ${ac_cv_path_DSYMUTIL+:} false; then :
22195  $as_echo_n "(cached) " >&6
22196else
22197  case $DSYMUTIL in
22198  [\\/]* | ?:[\\/]*)
22199  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22200  ;;
22201  *)
22202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22203for as_dir in $PATH
22204do
22205  IFS=$as_save_IFS
22206  test -z "$as_dir" && as_dir=.
22207    for ac_exec_ext in '' $ac_executable_extensions; do
22208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22209    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22211    break 2
22212  fi
22213done
22214  done
22215IFS=$as_save_IFS
22216
22217  ;;
22218esac
22219fi
22220DSYMUTIL=$ac_cv_path_DSYMUTIL
22221if test -n "$DSYMUTIL"; then
22222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22223$as_echo "$DSYMUTIL" >&6; }
22224else
22225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22226$as_echo "no" >&6; }
22227fi
22228
22229
22230  test -n "$DSYMUTIL" && break
22231done
22232
22233  else
22234    # The variable is set, but is it from the command line or the environment?
22235
22236    # Try to remove the string !DSYMUTIL! from our list.
22237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22239      # If it failed, the variable was not from the command line. Ignore it,
22240      # but warn the user (except for BASH, which is always set by the calling BASH).
22241      if test "xDSYMUTIL" != xBASH; then
22242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22243$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22244      fi
22245      # Try to locate tool using the code snippet
22246      for ac_prog in dsymutil
22247do
22248  # Extract the first word of "$ac_prog", so it can be a program name with args.
22249set dummy $ac_prog; ac_word=$2
22250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22251$as_echo_n "checking for $ac_word... " >&6; }
22252if ${ac_cv_path_DSYMUTIL+:} false; then :
22253  $as_echo_n "(cached) " >&6
22254else
22255  case $DSYMUTIL in
22256  [\\/]* | ?:[\\/]*)
22257  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22258  ;;
22259  *)
22260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22261for as_dir in $PATH
22262do
22263  IFS=$as_save_IFS
22264  test -z "$as_dir" && as_dir=.
22265    for ac_exec_ext in '' $ac_executable_extensions; do
22266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22267    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22269    break 2
22270  fi
22271done
22272  done
22273IFS=$as_save_IFS
22274
22275  ;;
22276esac
22277fi
22278DSYMUTIL=$ac_cv_path_DSYMUTIL
22279if test -n "$DSYMUTIL"; then
22280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22281$as_echo "$DSYMUTIL" >&6; }
22282else
22283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22284$as_echo "no" >&6; }
22285fi
22286
22287
22288  test -n "$DSYMUTIL" && break
22289done
22290
22291    else
22292      # If it succeeded, then it was overridden by the user. We will use it
22293      # for the tool.
22294
22295      # First remove it from the list of overridden variables, so we can test
22296      # for unknown variables in the end.
22297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22298
22299      # Check if we try to supply an empty value
22300      if test "x$DSYMUTIL" = x; then
22301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22302$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22304$as_echo_n "checking for DSYMUTIL... " >&6; }
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22306$as_echo "disabled" >&6; }
22307      else
22308        # Check if the provided tool contains a complete path.
22309        tool_specified="$DSYMUTIL"
22310        tool_basename="${tool_specified##*/}"
22311        if test "x$tool_basename" = "x$tool_specified"; then
22312          # A command without a complete path is provided, search $PATH.
22313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22314$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22315          # Extract the first word of "$tool_basename", so it can be a program name with args.
22316set dummy $tool_basename; ac_word=$2
22317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22318$as_echo_n "checking for $ac_word... " >&6; }
22319if ${ac_cv_path_DSYMUTIL+:} false; then :
22320  $as_echo_n "(cached) " >&6
22321else
22322  case $DSYMUTIL in
22323  [\\/]* | ?:[\\/]*)
22324  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22325  ;;
22326  *)
22327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22328for as_dir in $PATH
22329do
22330  IFS=$as_save_IFS
22331  test -z "$as_dir" && as_dir=.
22332    for ac_exec_ext in '' $ac_executable_extensions; do
22333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22334    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22336    break 2
22337  fi
22338done
22339  done
22340IFS=$as_save_IFS
22341
22342  ;;
22343esac
22344fi
22345DSYMUTIL=$ac_cv_path_DSYMUTIL
22346if test -n "$DSYMUTIL"; then
22347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22348$as_echo "$DSYMUTIL" >&6; }
22349else
22350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22351$as_echo "no" >&6; }
22352fi
22353
22354
22355          if test "x$DSYMUTIL" = x; then
22356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22357          fi
22358        else
22359          # Otherwise we believe it is a complete path. Use it as it is.
22360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22361$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22363$as_echo_n "checking for DSYMUTIL... " >&6; }
22364          if test ! -x "$tool_specified"; then
22365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22366$as_echo "not found" >&6; }
22367            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22368          fi
22369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22370$as_echo "$tool_specified" >&6; }
22371        fi
22372      fi
22373    fi
22374
22375  fi
22376
22377
22378
22379  if test "x$DSYMUTIL" = x; then
22380    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22381  fi
22382
22383
22384
22385
22386
22387  # Publish this variable in the help.
22388
22389
22390  if [ -z "${XATTR+x}" ]; then
22391    # The variable is not set by user, try to locate tool using the code snippet
22392    for ac_prog in xattr
22393do
22394  # Extract the first word of "$ac_prog", so it can be a program name with args.
22395set dummy $ac_prog; ac_word=$2
22396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22397$as_echo_n "checking for $ac_word... " >&6; }
22398if ${ac_cv_path_XATTR+:} false; then :
22399  $as_echo_n "(cached) " >&6
22400else
22401  case $XATTR in
22402  [\\/]* | ?:[\\/]*)
22403  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22404  ;;
22405  *)
22406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22407for as_dir in $PATH
22408do
22409  IFS=$as_save_IFS
22410  test -z "$as_dir" && as_dir=.
22411    for ac_exec_ext in '' $ac_executable_extensions; do
22412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22413    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22415    break 2
22416  fi
22417done
22418  done
22419IFS=$as_save_IFS
22420
22421  ;;
22422esac
22423fi
22424XATTR=$ac_cv_path_XATTR
22425if test -n "$XATTR"; then
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22427$as_echo "$XATTR" >&6; }
22428else
22429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22430$as_echo "no" >&6; }
22431fi
22432
22433
22434  test -n "$XATTR" && break
22435done
22436
22437  else
22438    # The variable is set, but is it from the command line or the environment?
22439
22440    # Try to remove the string !XATTR! from our list.
22441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22443      # If it failed, the variable was not from the command line. Ignore it,
22444      # but warn the user (except for BASH, which is always set by the calling BASH).
22445      if test "xXATTR" != xBASH; then
22446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22447$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22448      fi
22449      # Try to locate tool using the code snippet
22450      for ac_prog in xattr
22451do
22452  # Extract the first word of "$ac_prog", so it can be a program name with args.
22453set dummy $ac_prog; ac_word=$2
22454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22455$as_echo_n "checking for $ac_word... " >&6; }
22456if ${ac_cv_path_XATTR+:} false; then :
22457  $as_echo_n "(cached) " >&6
22458else
22459  case $XATTR in
22460  [\\/]* | ?:[\\/]*)
22461  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22462  ;;
22463  *)
22464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22465for as_dir in $PATH
22466do
22467  IFS=$as_save_IFS
22468  test -z "$as_dir" && as_dir=.
22469    for ac_exec_ext in '' $ac_executable_extensions; do
22470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22471    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22473    break 2
22474  fi
22475done
22476  done
22477IFS=$as_save_IFS
22478
22479  ;;
22480esac
22481fi
22482XATTR=$ac_cv_path_XATTR
22483if test -n "$XATTR"; then
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22485$as_echo "$XATTR" >&6; }
22486else
22487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22488$as_echo "no" >&6; }
22489fi
22490
22491
22492  test -n "$XATTR" && break
22493done
22494
22495    else
22496      # If it succeeded, then it was overridden by the user. We will use it
22497      # for the tool.
22498
22499      # First remove it from the list of overridden variables, so we can test
22500      # for unknown variables in the end.
22501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22502
22503      # Check if we try to supply an empty value
22504      if test "x$XATTR" = x; then
22505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22506$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22508$as_echo_n "checking for XATTR... " >&6; }
22509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22510$as_echo "disabled" >&6; }
22511      else
22512        # Check if the provided tool contains a complete path.
22513        tool_specified="$XATTR"
22514        tool_basename="${tool_specified##*/}"
22515        if test "x$tool_basename" = "x$tool_specified"; then
22516          # A command without a complete path is provided, search $PATH.
22517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22518$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22519          # Extract the first word of "$tool_basename", so it can be a program name with args.
22520set dummy $tool_basename; ac_word=$2
22521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22522$as_echo_n "checking for $ac_word... " >&6; }
22523if ${ac_cv_path_XATTR+:} false; then :
22524  $as_echo_n "(cached) " >&6
22525else
22526  case $XATTR in
22527  [\\/]* | ?:[\\/]*)
22528  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22529  ;;
22530  *)
22531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22532for as_dir in $PATH
22533do
22534  IFS=$as_save_IFS
22535  test -z "$as_dir" && as_dir=.
22536    for ac_exec_ext in '' $ac_executable_extensions; do
22537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22538    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22540    break 2
22541  fi
22542done
22543  done
22544IFS=$as_save_IFS
22545
22546  ;;
22547esac
22548fi
22549XATTR=$ac_cv_path_XATTR
22550if test -n "$XATTR"; then
22551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22552$as_echo "$XATTR" >&6; }
22553else
22554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22555$as_echo "no" >&6; }
22556fi
22557
22558
22559          if test "x$XATTR" = x; then
22560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22561          fi
22562        else
22563          # Otherwise we believe it is a complete path. Use it as it is.
22564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22565$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22567$as_echo_n "checking for XATTR... " >&6; }
22568          if test ! -x "$tool_specified"; then
22569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22570$as_echo "not found" >&6; }
22571            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22572          fi
22573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22574$as_echo "$tool_specified" >&6; }
22575        fi
22576      fi
22577    fi
22578
22579  fi
22580
22581
22582
22583  if test "x$XATTR" = x; then
22584    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22585  fi
22586
22587
22588
22589
22590  # Publish this variable in the help.
22591
22592
22593  if [ -z "${CODESIGN+x}" ]; then
22594    # The variable is not set by user, try to locate tool using the code snippet
22595    for ac_prog in codesign
22596do
22597  # Extract the first word of "$ac_prog", so it can be a program name with args.
22598set dummy $ac_prog; ac_word=$2
22599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22600$as_echo_n "checking for $ac_word... " >&6; }
22601if ${ac_cv_path_CODESIGN+:} false; then :
22602  $as_echo_n "(cached) " >&6
22603else
22604  case $CODESIGN in
22605  [\\/]* | ?:[\\/]*)
22606  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22607  ;;
22608  *)
22609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22610for as_dir in $PATH
22611do
22612  IFS=$as_save_IFS
22613  test -z "$as_dir" && as_dir=.
22614    for ac_exec_ext in '' $ac_executable_extensions; do
22615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22616    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22618    break 2
22619  fi
22620done
22621  done
22622IFS=$as_save_IFS
22623
22624  ;;
22625esac
22626fi
22627CODESIGN=$ac_cv_path_CODESIGN
22628if test -n "$CODESIGN"; then
22629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22630$as_echo "$CODESIGN" >&6; }
22631else
22632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22633$as_echo "no" >&6; }
22634fi
22635
22636
22637  test -n "$CODESIGN" && break
22638done
22639
22640  else
22641    # The variable is set, but is it from the command line or the environment?
22642
22643    # Try to remove the string !CODESIGN! from our list.
22644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22646      # If it failed, the variable was not from the command line. Ignore it,
22647      # but warn the user (except for BASH, which is always set by the calling BASH).
22648      if test "xCODESIGN" != xBASH; then
22649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22650$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22651      fi
22652      # Try to locate tool using the code snippet
22653      for ac_prog in codesign
22654do
22655  # Extract the first word of "$ac_prog", so it can be a program name with args.
22656set dummy $ac_prog; ac_word=$2
22657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22658$as_echo_n "checking for $ac_word... " >&6; }
22659if ${ac_cv_path_CODESIGN+:} false; then :
22660  $as_echo_n "(cached) " >&6
22661else
22662  case $CODESIGN in
22663  [\\/]* | ?:[\\/]*)
22664  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22665  ;;
22666  *)
22667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22668for as_dir in $PATH
22669do
22670  IFS=$as_save_IFS
22671  test -z "$as_dir" && as_dir=.
22672    for ac_exec_ext in '' $ac_executable_extensions; do
22673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22674    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22676    break 2
22677  fi
22678done
22679  done
22680IFS=$as_save_IFS
22681
22682  ;;
22683esac
22684fi
22685CODESIGN=$ac_cv_path_CODESIGN
22686if test -n "$CODESIGN"; then
22687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22688$as_echo "$CODESIGN" >&6; }
22689else
22690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22691$as_echo "no" >&6; }
22692fi
22693
22694
22695  test -n "$CODESIGN" && break
22696done
22697
22698    else
22699      # If it succeeded, then it was overridden by the user. We will use it
22700      # for the tool.
22701
22702      # First remove it from the list of overridden variables, so we can test
22703      # for unknown variables in the end.
22704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22705
22706      # Check if we try to supply an empty value
22707      if test "x$CODESIGN" = x; then
22708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22709$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22711$as_echo_n "checking for CODESIGN... " >&6; }
22712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22713$as_echo "disabled" >&6; }
22714      else
22715        # Check if the provided tool contains a complete path.
22716        tool_specified="$CODESIGN"
22717        tool_basename="${tool_specified##*/}"
22718        if test "x$tool_basename" = "x$tool_specified"; then
22719          # A command without a complete path is provided, search $PATH.
22720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22721$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22722          # Extract the first word of "$tool_basename", so it can be a program name with args.
22723set dummy $tool_basename; ac_word=$2
22724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22725$as_echo_n "checking for $ac_word... " >&6; }
22726if ${ac_cv_path_CODESIGN+:} false; then :
22727  $as_echo_n "(cached) " >&6
22728else
22729  case $CODESIGN in
22730  [\\/]* | ?:[\\/]*)
22731  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22732  ;;
22733  *)
22734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22735for as_dir in $PATH
22736do
22737  IFS=$as_save_IFS
22738  test -z "$as_dir" && as_dir=.
22739    for ac_exec_ext in '' $ac_executable_extensions; do
22740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22741    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22743    break 2
22744  fi
22745done
22746  done
22747IFS=$as_save_IFS
22748
22749  ;;
22750esac
22751fi
22752CODESIGN=$ac_cv_path_CODESIGN
22753if test -n "$CODESIGN"; then
22754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22755$as_echo "$CODESIGN" >&6; }
22756else
22757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22758$as_echo "no" >&6; }
22759fi
22760
22761
22762          if test "x$CODESIGN" = x; then
22763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22764          fi
22765        else
22766          # Otherwise we believe it is a complete path. Use it as it is.
22767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22768$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22770$as_echo_n "checking for CODESIGN... " >&6; }
22771          if test ! -x "$tool_specified"; then
22772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22773$as_echo "not found" >&6; }
22774            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22775          fi
22776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22777$as_echo "$tool_specified" >&6; }
22778        fi
22779      fi
22780    fi
22781
22782  fi
22783
22784
22785    if test "x$CODESIGN" != "x"; then
22786      # Verify that the openjdk_codesign certificate is present
22787      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22788$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22789      rm -f codesign-testfile
22790      touch codesign-testfile
22791      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22792      rm -f codesign-testfile
22793      if test "x$CODESIGN" = x; then
22794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22795$as_echo "no" >&6; }
22796      else
22797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22798$as_echo "yes" >&6; }
22799      fi
22800    fi
22801
22802
22803
22804  # Publish this variable in the help.
22805
22806
22807  if [ -z "${SETFILE+x}" ]; then
22808    # The variable is not set by user, try to locate tool using the code snippet
22809    for ac_prog in SetFile
22810do
22811  # Extract the first word of "$ac_prog", so it can be a program name with args.
22812set dummy $ac_prog; ac_word=$2
22813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22814$as_echo_n "checking for $ac_word... " >&6; }
22815if ${ac_cv_path_SETFILE+:} false; then :
22816  $as_echo_n "(cached) " >&6
22817else
22818  case $SETFILE in
22819  [\\/]* | ?:[\\/]*)
22820  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22821  ;;
22822  *)
22823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22824for as_dir in $PATH
22825do
22826  IFS=$as_save_IFS
22827  test -z "$as_dir" && as_dir=.
22828    for ac_exec_ext in '' $ac_executable_extensions; do
22829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22830    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22832    break 2
22833  fi
22834done
22835  done
22836IFS=$as_save_IFS
22837
22838  ;;
22839esac
22840fi
22841SETFILE=$ac_cv_path_SETFILE
22842if test -n "$SETFILE"; then
22843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22844$as_echo "$SETFILE" >&6; }
22845else
22846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22847$as_echo "no" >&6; }
22848fi
22849
22850
22851  test -n "$SETFILE" && break
22852done
22853
22854  else
22855    # The variable is set, but is it from the command line or the environment?
22856
22857    # Try to remove the string !SETFILE! from our list.
22858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22860      # If it failed, the variable was not from the command line. Ignore it,
22861      # but warn the user (except for BASH, which is always set by the calling BASH).
22862      if test "xSETFILE" != xBASH; then
22863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22864$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22865      fi
22866      # Try to locate tool using the code snippet
22867      for ac_prog in SetFile
22868do
22869  # Extract the first word of "$ac_prog", so it can be a program name with args.
22870set dummy $ac_prog; ac_word=$2
22871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22872$as_echo_n "checking for $ac_word... " >&6; }
22873if ${ac_cv_path_SETFILE+:} false; then :
22874  $as_echo_n "(cached) " >&6
22875else
22876  case $SETFILE in
22877  [\\/]* | ?:[\\/]*)
22878  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22879  ;;
22880  *)
22881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22882for as_dir in $PATH
22883do
22884  IFS=$as_save_IFS
22885  test -z "$as_dir" && as_dir=.
22886    for ac_exec_ext in '' $ac_executable_extensions; do
22887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22888    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22890    break 2
22891  fi
22892done
22893  done
22894IFS=$as_save_IFS
22895
22896  ;;
22897esac
22898fi
22899SETFILE=$ac_cv_path_SETFILE
22900if test -n "$SETFILE"; then
22901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22902$as_echo "$SETFILE" >&6; }
22903else
22904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22905$as_echo "no" >&6; }
22906fi
22907
22908
22909  test -n "$SETFILE" && break
22910done
22911
22912    else
22913      # If it succeeded, then it was overridden by the user. We will use it
22914      # for the tool.
22915
22916      # First remove it from the list of overridden variables, so we can test
22917      # for unknown variables in the end.
22918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22919
22920      # Check if we try to supply an empty value
22921      if test "x$SETFILE" = x; then
22922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22923$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22925$as_echo_n "checking for SETFILE... " >&6; }
22926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22927$as_echo "disabled" >&6; }
22928      else
22929        # Check if the provided tool contains a complete path.
22930        tool_specified="$SETFILE"
22931        tool_basename="${tool_specified##*/}"
22932        if test "x$tool_basename" = "x$tool_specified"; then
22933          # A command without a complete path is provided, search $PATH.
22934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22935$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22936          # Extract the first word of "$tool_basename", so it can be a program name with args.
22937set dummy $tool_basename; ac_word=$2
22938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22939$as_echo_n "checking for $ac_word... " >&6; }
22940if ${ac_cv_path_SETFILE+:} false; then :
22941  $as_echo_n "(cached) " >&6
22942else
22943  case $SETFILE in
22944  [\\/]* | ?:[\\/]*)
22945  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22946  ;;
22947  *)
22948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22949for as_dir in $PATH
22950do
22951  IFS=$as_save_IFS
22952  test -z "$as_dir" && as_dir=.
22953    for ac_exec_ext in '' $ac_executable_extensions; do
22954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22955    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22957    break 2
22958  fi
22959done
22960  done
22961IFS=$as_save_IFS
22962
22963  ;;
22964esac
22965fi
22966SETFILE=$ac_cv_path_SETFILE
22967if test -n "$SETFILE"; then
22968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22969$as_echo "$SETFILE" >&6; }
22970else
22971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22972$as_echo "no" >&6; }
22973fi
22974
22975
22976          if test "x$SETFILE" = x; then
22977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22978          fi
22979        else
22980          # Otherwise we believe it is a complete path. Use it as it is.
22981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22982$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22984$as_echo_n "checking for SETFILE... " >&6; }
22985          if test ! -x "$tool_specified"; then
22986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22987$as_echo "not found" >&6; }
22988            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22989          fi
22990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22991$as_echo "$tool_specified" >&6; }
22992        fi
22993      fi
22994    fi
22995
22996  fi
22997
22998
22999
23000  if test "x$SETFILE" = x; then
23001    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23002  fi
23003
23004
23005  fi
23006
23007
23008  # Test if bash supports pipefail.
23009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23010$as_echo_n "checking if bash supports pipefail... " >&6; }
23011  if ${BASH} -c 'set -o pipefail'; then
23012    BASH_ARGS="$BASH_ARGS -o pipefail"
23013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23014$as_echo "yes" >&6; }
23015  else
23016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23017$as_echo "no" >&6; }
23018  fi
23019
23020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23021$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23022  if ${BASH} -e -c 'true'; then
23023    BASH_ARGS="$BASH_ARGS -e"
23024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23025$as_echo "yes" >&6; }
23026  else
23027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23028$as_echo "no" >&6; }
23029  fi
23030
23031
23032
23033
23034# Check if pkg-config is available.
23035
23036
23037if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23038	if test -n "$ac_tool_prefix"; then
23039  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23040set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23042$as_echo_n "checking for $ac_word... " >&6; }
23043if ${ac_cv_path_PKG_CONFIG+:} false; then :
23044  $as_echo_n "(cached) " >&6
23045else
23046  case $PKG_CONFIG in
23047  [\\/]* | ?:[\\/]*)
23048  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23049  ;;
23050  *)
23051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23052for as_dir in $PATH
23053do
23054  IFS=$as_save_IFS
23055  test -z "$as_dir" && as_dir=.
23056    for ac_exec_ext in '' $ac_executable_extensions; do
23057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23058    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23060    break 2
23061  fi
23062done
23063  done
23064IFS=$as_save_IFS
23065
23066  ;;
23067esac
23068fi
23069PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23070if test -n "$PKG_CONFIG"; then
23071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23072$as_echo "$PKG_CONFIG" >&6; }
23073else
23074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23075$as_echo "no" >&6; }
23076fi
23077
23078
23079fi
23080if test -z "$ac_cv_path_PKG_CONFIG"; then
23081  ac_pt_PKG_CONFIG=$PKG_CONFIG
23082  # Extract the first word of "pkg-config", so it can be a program name with args.
23083set dummy pkg-config; ac_word=$2
23084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23085$as_echo_n "checking for $ac_word... " >&6; }
23086if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23087  $as_echo_n "(cached) " >&6
23088else
23089  case $ac_pt_PKG_CONFIG in
23090  [\\/]* | ?:[\\/]*)
23091  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23092  ;;
23093  *)
23094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23095for as_dir in $PATH
23096do
23097  IFS=$as_save_IFS
23098  test -z "$as_dir" && as_dir=.
23099    for ac_exec_ext in '' $ac_executable_extensions; do
23100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23101    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23103    break 2
23104  fi
23105done
23106  done
23107IFS=$as_save_IFS
23108
23109  ;;
23110esac
23111fi
23112ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23113if test -n "$ac_pt_PKG_CONFIG"; then
23114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23115$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23116else
23117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23118$as_echo "no" >&6; }
23119fi
23120
23121  if test "x$ac_pt_PKG_CONFIG" = x; then
23122    PKG_CONFIG=""
23123  else
23124    case $cross_compiling:$ac_tool_warned in
23125yes:)
23126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23128ac_tool_warned=yes ;;
23129esac
23130    PKG_CONFIG=$ac_pt_PKG_CONFIG
23131  fi
23132else
23133  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23134fi
23135
23136fi
23137if test -n "$PKG_CONFIG"; then
23138	_pkg_min_version=0.9.0
23139	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23140$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23141	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23142		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23143$as_echo "yes" >&6; }
23144	else
23145		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23146$as_echo "no" >&6; }
23147		PKG_CONFIG=""
23148	fi
23149
23150fi
23151
23152# After basic tools have been setup, we can check build os specific details.
23153
23154  ###############################################################################
23155
23156  # Note that this is the build platform OS version!
23157
23158  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23159  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23160  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23161  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23162
23163
23164
23165
23166
23167# Misc basic settings
23168
23169
23170# Check whether --with-default-make-target was given.
23171if test "${with_default_make_target+set}" = set; then :
23172  withval=$with_default_make_target;
23173fi
23174
23175  if test "x$with_default_make_target" = "x" \
23176      || test "x$with_default_make_target" = "xyes"; then
23177    DEFAULT_MAKE_TARGET="exploded-image"
23178  elif test "x$with_default_make_target" = "xno"; then
23179    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23180  else
23181    DEFAULT_MAKE_TARGET="$with_default_make_target"
23182  fi
23183
23184
23185
23186
23187###############################################################################
23188#
23189# Determine OpenJDK variants, options and version numbers.
23190#
23191###############################################################################
23192
23193# We need build & target for this.
23194
23195  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23196  # We always build headless support.
23197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23198$as_echo_n "checking headful support... " >&6; }
23199  # Check whether --enable-headful was given.
23200if test "${enable_headful+set}" = set; then :
23201  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23202else
23203  SUPPORT_HEADFUL=yes
23204fi
23205
23206
23207  SUPPORT_HEADLESS=yes
23208  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23209
23210  if test "x$SUPPORT_HEADFUL" = xyes; then
23211    # We are building both headful and headless.
23212    headful_msg="include support for both headful and headless"
23213  fi
23214
23215  if test "x$SUPPORT_HEADFUL" = xno; then
23216    # Thus we are building headless only.
23217    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23218    headful_msg="headless only"
23219  fi
23220
23221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23222$as_echo "$headful_msg" >&6; }
23223
23224
23225
23226
23227
23228  # Choose cacerts source file
23229
23230# Check whether --with-cacerts-file was given.
23231if test "${with_cacerts_file+set}" = set; then :
23232  withval=$with_cacerts_file;
23233fi
23234
23235  if test "x$with_cacerts_file" != x; then
23236    CACERTS_FILE=$with_cacerts_file
23237  fi
23238
23239
23240  # Enable or disable unlimited crypto
23241  # Check whether --enable-unlimited-crypto was given.
23242if test "${enable_unlimited_crypto+set}" = set; then :
23243  enableval=$enable_unlimited_crypto;
23244else
23245  enable_unlimited_crypto=no
23246fi
23247
23248  if test "x$enable_unlimited_crypto" = "xyes"; then
23249    UNLIMITED_CRYPTO=true
23250  else
23251    UNLIMITED_CRYPTO=false
23252  fi
23253
23254
23255  # Compress jars
23256  COMPRESS_JARS=false
23257
23258
23259
23260  # Setup default copyright year. Mostly overridden when building close to a new year.
23261
23262# Check whether --with-copyright-year was given.
23263if test "${with_copyright_year+set}" = set; then :
23264  withval=$with_copyright_year;
23265fi
23266
23267  if test "x$with_copyright_year" = xyes; then
23268    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23269  elif test "x$with_copyright_year" != x; then
23270    COPYRIGHT_YEAR="$with_copyright_year"
23271  else
23272    COPYRIGHT_YEAR=`date +'%Y'`
23273  fi
23274
23275
23276
23277  # Control wether Hotspot runs Queens test after build.
23278  # Check whether --enable-hotspot-test-in-build was given.
23279if test "${enable_hotspot_test_in_build+set}" = set; then :
23280  enableval=$enable_hotspot_test_in_build;
23281else
23282  enable_hotspot_test_in_build=no
23283fi
23284
23285  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23286    TEST_IN_BUILD=true
23287  else
23288    TEST_IN_BUILD=false
23289  fi
23290
23291
23292
23293  # Warn user that old version arguments are deprecated.
23294
23295
23296# Check whether --with-milestone was given.
23297if test "${with_milestone+set}" = set; then :
23298  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23299$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23300fi
23301
23302
23303
23304
23305# Check whether --with-update-version was given.
23306if test "${with_update_version+set}" = set; then :
23307  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23308$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23309fi
23310
23311
23312
23313
23314# Check whether --with-user-release-suffix was given.
23315if test "${with_user_release_suffix+set}" = set; then :
23316  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
23317$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23318fi
23319
23320
23321
23322
23323# Check whether --with-build-number was given.
23324if test "${with_build_number+set}" = set; then :
23325  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23326$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23327fi
23328
23329
23330
23331  # Source the version numbers file
23332  . $AUTOCONF_DIR/version-numbers
23333
23334  # Some non-version number information is set in that file
23335
23336
23337
23338
23339
23340
23341
23342
23343  # Override version from arguments
23344
23345  # If --with-version-string is set, process it first. It is possible to
23346  # override parts with more specific flags, since these are processed later.
23347
23348# Check whether --with-version-string was given.
23349if test "${with_version_string+set}" = set; then :
23350  withval=$with_version_string;
23351fi
23352
23353  if test "x$with_version_string" = xyes; then
23354    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23355  elif test "x$with_version_string" != x; then
23356    # Additional [] needed to keep m4 from mangling shell constructs.
23357    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23358      VERSION_MAJOR=${BASH_REMATCH[1]}
23359      VERSION_MINOR=${BASH_REMATCH[3]}
23360      VERSION_SECURITY=${BASH_REMATCH[5]}
23361      VERSION_PATCH=${BASH_REMATCH[7]}
23362      VERSION_PRE=${BASH_REMATCH[9]}
23363      version_plus_separator=${BASH_REMATCH[11]}
23364      VERSION_BUILD=${BASH_REMATCH[12]}
23365      VERSION_OPT=${BASH_REMATCH[14]}
23366      # Unspecified numerical fields are interpreted as 0.
23367      if test "x$VERSION_MINOR" = x; then
23368        VERSION_MINOR=0
23369      fi
23370      if test "x$VERSION_SECURITY" = x; then
23371        VERSION_SECURITY=0
23372      fi
23373      if test "x$VERSION_PATCH" = x; then
23374        VERSION_PATCH=0
23375      fi
23376      if test "x$version_plus_separator" != x \
23377          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23378        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23379      fi
23380      # Stop the version part process from setting default values.
23381      # We still allow them to explicitely override though.
23382      NO_DEFAULT_VERSION_PARTS=true
23383    else
23384      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23385    fi
23386  fi
23387
23388
23389# Check whether --with-version-pre was given.
23390if test "${with_version_pre+set}" = set; then :
23391  withval=$with_version_pre; with_version_pre_present=true
23392else
23393  with_version_pre_present=false
23394fi
23395
23396
23397  if test "x$with_version_pre_present" = xtrue; then
23398    if test "x$with_version_pre" = xyes; then
23399      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23400    elif test "x$with_version_pre" = xno; then
23401      # Interpret --without-* as empty string instead of the literal "no"
23402      VERSION_PRE=
23403    else
23404      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23405       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23406      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23408$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23409      fi
23410    fi
23411  else
23412    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23413      # Default is to use "internal" as pre
23414      VERSION_PRE="internal"
23415    fi
23416  fi
23417
23418
23419# Check whether --with-version-opt was given.
23420if test "${with_version_opt+set}" = set; then :
23421  withval=$with_version_opt; with_version_opt_present=true
23422else
23423  with_version_opt_present=false
23424fi
23425
23426
23427  if test "x$with_version_opt_present" = xtrue; then
23428    if test "x$with_version_opt" = xyes; then
23429      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23430    elif test "x$with_version_opt" = xno; then
23431      # Interpret --without-* as empty string instead of the literal "no"
23432      VERSION_OPT=
23433    else
23434      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23435       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23436      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23438$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23439      fi
23440    fi
23441  else
23442    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23443      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23444      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23445      # Outer [ ] to quote m4.
23446       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23447       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23448      VERSION_OPT="$timestamp.$username.$basedirname"
23449    fi
23450  fi
23451
23452
23453# Check whether --with-version-build was given.
23454if test "${with_version_build+set}" = set; then :
23455  withval=$with_version_build; with_version_build_present=true
23456else
23457  with_version_build_present=false
23458fi
23459
23460
23461  if test "x$with_version_build_present" = xtrue; then
23462    if test "x$with_version_build" = xyes; then
23463      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23464    elif test "x$with_version_build" = xno; then
23465      # Interpret --without-* as empty string instead of the literal "no"
23466      VERSION_BUILD=
23467    elif test "x$with_version_build" = x; then
23468      VERSION_BUILD=
23469    else
23470
23471  # Additional [] needed to keep m4 from mangling shell constructs.
23472  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23473    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23474  fi
23475  # Extract the version number without leading zeros.
23476  cleaned_value=${BASH_REMATCH[1]}
23477  if test "x$cleaned_value" = x; then
23478    # Special case for zero
23479    cleaned_value=${BASH_REMATCH[2]}
23480  fi
23481
23482  if test $cleaned_value -gt 255; then
23483    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23484  fi
23485  if test "x$cleaned_value" != "x$with_version_build"; then
23486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23487$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23488  fi
23489  VERSION_BUILD=$cleaned_value
23490
23491    fi
23492  else
23493    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23494      # Default is to not have a build number.
23495      VERSION_BUILD=""
23496      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23497      VERSION_BUILD=0
23498    fi
23499  fi
23500
23501
23502# Check whether --with-version-major was given.
23503if test "${with_version_major+set}" = set; then :
23504  withval=$with_version_major; with_version_major_present=true
23505else
23506  with_version_major_present=false
23507fi
23508
23509
23510  if test "x$with_version_major_present" = xtrue; then
23511    if test "x$with_version_major" = xyes; then
23512      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23513    else
23514
23515  # Additional [] needed to keep m4 from mangling shell constructs.
23516  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23517    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23518  fi
23519  # Extract the version number without leading zeros.
23520  cleaned_value=${BASH_REMATCH[1]}
23521  if test "x$cleaned_value" = x; then
23522    # Special case for zero
23523    cleaned_value=${BASH_REMATCH[2]}
23524  fi
23525
23526  if test $cleaned_value -gt 255; then
23527    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23528  fi
23529  if test "x$cleaned_value" != "x$with_version_major"; then
23530    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23531$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23532  fi
23533  VERSION_MAJOR=$cleaned_value
23534
23535    fi
23536  else
23537    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23538      # Default is to get value from version-numbers
23539      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23540    fi
23541  fi
23542
23543
23544# Check whether --with-version-minor was given.
23545if test "${with_version_minor+set}" = set; then :
23546  withval=$with_version_minor; with_version_minor_present=true
23547else
23548  with_version_minor_present=false
23549fi
23550
23551
23552  if test "x$with_version_minor_present" = xtrue; then
23553    if test "x$with_version_minor" = xyes; then
23554      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23555    elif test "x$with_version_minor" = xno; then
23556      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23557      VERSION_MINOR=0
23558    elif test "x$with_version_minor" = x; then
23559      VERSION_MINOR=0
23560    else
23561
23562  # Additional [] needed to keep m4 from mangling shell constructs.
23563  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23564    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23565  fi
23566  # Extract the version number without leading zeros.
23567  cleaned_value=${BASH_REMATCH[1]}
23568  if test "x$cleaned_value" = x; then
23569    # Special case for zero
23570    cleaned_value=${BASH_REMATCH[2]}
23571  fi
23572
23573  if test $cleaned_value -gt 255; then
23574    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23575  fi
23576  if test "x$cleaned_value" != "x$with_version_minor"; then
23577    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23578$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23579  fi
23580  VERSION_MINOR=$cleaned_value
23581
23582    fi
23583  else
23584    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23585      # Default is 0, if unspecified
23586      VERSION_MINOR=0
23587    fi
23588  fi
23589
23590
23591# Check whether --with-version-security was given.
23592if test "${with_version_security+set}" = set; then :
23593  withval=$with_version_security; with_version_security_present=true
23594else
23595  with_version_security_present=false
23596fi
23597
23598
23599  if test "x$with_version_security_present" = xtrue; then
23600    if test "x$with_version_security" = xyes; then
23601      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23602    elif test "x$with_version_security" = xno; then
23603      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23604      VERSION_SECURITY=0
23605    elif test "x$with_version_security" = x; then
23606      VERSION_SECURITY=0
23607    else
23608
23609  # Additional [] needed to keep m4 from mangling shell constructs.
23610  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23611    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23612  fi
23613  # Extract the version number without leading zeros.
23614  cleaned_value=${BASH_REMATCH[1]}
23615  if test "x$cleaned_value" = x; then
23616    # Special case for zero
23617    cleaned_value=${BASH_REMATCH[2]}
23618  fi
23619
23620  if test $cleaned_value -gt 255; then
23621    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23622  fi
23623  if test "x$cleaned_value" != "x$with_version_security"; then
23624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23625$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23626  fi
23627  VERSION_SECURITY=$cleaned_value
23628
23629    fi
23630  else
23631    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23632      # Default is 0, if unspecified
23633      VERSION_SECURITY=0
23634    fi
23635  fi
23636
23637
23638# Check whether --with-version-patch was given.
23639if test "${with_version_patch+set}" = set; then :
23640  withval=$with_version_patch; with_version_patch_present=true
23641else
23642  with_version_patch_present=false
23643fi
23644
23645
23646  if test "x$with_version_patch_present" = xtrue; then
23647    if test "x$with_version_patch" = xyes; then
23648      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23649    elif test "x$with_version_patch" = xno; then
23650      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23651      VERSION_PATCH=0
23652    elif test "x$with_version_patch" = x; then
23653      VERSION_PATCH=0
23654    else
23655
23656  # Additional [] needed to keep m4 from mangling shell constructs.
23657  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23658    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23659  fi
23660  # Extract the version number without leading zeros.
23661  cleaned_value=${BASH_REMATCH[1]}
23662  if test "x$cleaned_value" = x; then
23663    # Special case for zero
23664    cleaned_value=${BASH_REMATCH[2]}
23665  fi
23666
23667  if test $cleaned_value -gt 255; then
23668    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23669  fi
23670  if test "x$cleaned_value" != "x$with_version_patch"; then
23671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23672$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23673  fi
23674  VERSION_PATCH=$cleaned_value
23675
23676    fi
23677  else
23678    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23679      # Default is 0, if unspecified
23680      VERSION_PATCH=0
23681    fi
23682  fi
23683
23684  # Calculate derived version properties
23685
23686  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23687  if test "x$VERSION_PRE" = x; then
23688    VERSION_IS_GA=true
23689  else
23690    VERSION_IS_GA=false
23691  fi
23692
23693  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23694  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23695
23696  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23697  # Strip trailing zeroes from stripped_version_number
23698  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23699  VERSION_NUMBER=$stripped_version_number
23700
23701  # The complete version string, with additional build information
23702  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23703    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23704  else
23705    # If either build or opt is set, we need a + separator
23706    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23707  fi
23708
23709  # The short version string, just VERSION_NUMBER and PRE, if present.
23710  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23711
23712  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23713$as_echo_n "checking for version string... " >&6; }
23714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23715$as_echo "$VERSION_STRING" >&6; }
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731###############################################################################
23732#
23733# Setup BootJDK, used to bootstrap the build.
23734#
23735###############################################################################
23736
23737
23738  BOOT_JDK_FOUND=no
23739
23740# Check whether --with-boot-jdk was given.
23741if test "${with_boot_jdk+set}" = set; then :
23742  withval=$with_boot_jdk;
23743fi
23744
23745
23746  # We look for the Boot JDK through various means, going from more certain to
23747  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23748  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23749  # must check if this is indeed valid; otherwise we'll continue looking.
23750
23751  # Test: Is bootjdk explicitely set by command line arguments?
23752
23753  if test "x$BOOT_JDK_FOUND" = xno; then
23754    # Now execute the test
23755
23756  if test "x$with_boot_jdk" != x; then
23757    BOOT_JDK=$with_boot_jdk
23758    BOOT_JDK_FOUND=maybe
23759    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23760$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23761  fi
23762
23763
23764    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23765    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23766      # Do we have a bin/java?
23767      if test ! -x "$BOOT_JDK/bin/java"; then
23768        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23770        BOOT_JDK_FOUND=no
23771      else
23772        # Do we have a bin/javac?
23773        if test ! -x "$BOOT_JDK/bin/javac"; then
23774          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23776          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23777$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23778          BOOT_JDK_FOUND=no
23779        else
23780          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23781          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23782
23783          # Extra M4 quote needed to protect [] in grep expression.
23784          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23785          if test "x$FOUND_CORRECT_VERSION" = x; then
23786            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23788            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23789$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23790            BOOT_JDK_FOUND=no
23791          else
23792            # We're done! :-)
23793            BOOT_JDK_FOUND=yes
23794
23795  # Only process if variable expands to non-empty
23796
23797  if test "x$BOOT_JDK" != x; then
23798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23799
23800  # Input might be given as Windows format, start by converting to
23801  # unix format.
23802  path="$BOOT_JDK"
23803  new_path=`$CYGPATH -u "$path"`
23804
23805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23808  # "foo.exe" is OK but "foo" is an error.
23809  #
23810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23811  # It is also a way to make sure we got the proper file name for the real test later on.
23812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23813  if test "x$test_shortpath" = x; then
23814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23816    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23817  fi
23818
23819  # Call helper function which possibly converts this using DOS-style short mode.
23820  # If so, the updated path is stored in $new_path.
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23833      # Going to short mode and back again did indeed matter. Since short mode is
23834      # case insensitive, let's make it lowercase to improve readability.
23835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23836      # Now convert it back to Unix-style (cygpath)
23837      input_path=`$CYGPATH -u "$shortmode_path"`
23838      new_path="$input_path"
23839    fi
23840  fi
23841
23842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23843  if test "x$test_cygdrive_prefix" = x; then
23844    # As a simple fix, exclude /usr/bin since it's not a real path.
23845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23847      # a path prefixed by /cygdrive for fixpath to work.
23848      new_path="$CYGWIN_ROOT_PATH$input_path"
23849    fi
23850  fi
23851
23852
23853  if test "x$path" != "x$new_path"; then
23854    BOOT_JDK="$new_path"
23855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23857  fi
23858
23859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23860
23861  path="$BOOT_JDK"
23862  has_colon=`$ECHO $path | $GREP ^.:`
23863  new_path="$path"
23864  if test "x$has_colon" = x; then
23865    # Not in mixed or Windows style, start by that.
23866    new_path=`cmd //c echo $path`
23867  fi
23868
23869
23870  input_path="$new_path"
23871  # Check if we need to convert this using DOS-style short mode. If the path
23872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23873  # take no chances and rewrite it.
23874  # Note: m4 eats our [], so we need to use [ and ] instead.
23875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23876  if test "x$has_forbidden_chars" != x; then
23877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23879  fi
23880
23881
23882  windows_path="$new_path"
23883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23884    unix_path=`$CYGPATH -u "$windows_path"`
23885    new_path="$unix_path"
23886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23888    new_path="$unix_path"
23889  fi
23890
23891  if test "x$path" != "x$new_path"; then
23892    BOOT_JDK="$new_path"
23893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23895  fi
23896
23897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23899
23900    else
23901      # We're on a unix platform. Hooray! :)
23902      path="$BOOT_JDK"
23903      has_space=`$ECHO "$path" | $GREP " "`
23904      if test "x$has_space" != x; then
23905        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23907        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23908      fi
23909
23910      # Use eval to expand a potential ~
23911      eval path="$path"
23912      if test ! -f "$path" && test ! -d "$path"; then
23913        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23914      fi
23915
23916      if test -d "$path"; then
23917        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23918      else
23919        dir="`$DIRNAME "$path"`"
23920        base="`$BASENAME "$path"`"
23921        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23922      fi
23923    fi
23924  fi
23925
23926            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23927$as_echo_n "checking for Boot JDK... " >&6; }
23928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23929$as_echo "$BOOT_JDK" >&6; }
23930            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23931$as_echo_n "checking Boot JDK version... " >&6; }
23932            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23934$as_echo "$BOOT_JDK_VERSION" >&6; }
23935          fi # end check jdk version
23936        fi # end check javac
23937      fi # end check java
23938    fi # end check boot jdk found
23939  fi
23940
23941  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23942    # Having specified an argument which is incorrect will produce an instant failure;
23943    # we should not go on looking
23944    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23945  fi
23946
23947  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23948
23949  if test "x$BOOT_JDK_FOUND" = xno; then
23950    # Now execute the test
23951
23952  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23953    # First check at user selected default
23954
23955  if test "x$BOOT_JDK_FOUND" = xno; then
23956    # Now execute the test
23957
23958  if test -x /usr/libexec/java_home; then
23959    BOOT_JDK=`/usr/libexec/java_home `
23960    BOOT_JDK_FOUND=maybe
23961    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23962$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23963  fi
23964
23965
23966    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23967    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23968      # Do we have a bin/java?
23969      if test ! -x "$BOOT_JDK/bin/java"; then
23970        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23972        BOOT_JDK_FOUND=no
23973      else
23974        # Do we have a bin/javac?
23975        if test ! -x "$BOOT_JDK/bin/javac"; then
23976          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23978          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23979$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23980          BOOT_JDK_FOUND=no
23981        else
23982          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23983          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23984
23985          # Extra M4 quote needed to protect [] in grep expression.
23986          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23987          if test "x$FOUND_CORRECT_VERSION" = x; then
23988            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23990            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23991$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23992            BOOT_JDK_FOUND=no
23993          else
23994            # We're done! :-)
23995            BOOT_JDK_FOUND=yes
23996
23997  # Only process if variable expands to non-empty
23998
23999  if test "x$BOOT_JDK" != x; then
24000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24001
24002  # Input might be given as Windows format, start by converting to
24003  # unix format.
24004  path="$BOOT_JDK"
24005  new_path=`$CYGPATH -u "$path"`
24006
24007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24010  # "foo.exe" is OK but "foo" is an error.
24011  #
24012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24013  # It is also a way to make sure we got the proper file name for the real test later on.
24014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24015  if test "x$test_shortpath" = x; then
24016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24017$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24018    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24019  fi
24020
24021  # Call helper function which possibly converts this using DOS-style short mode.
24022  # If so, the updated path is stored in $new_path.
24023
24024  input_path="$new_path"
24025  # Check if we need to convert this using DOS-style short mode. If the path
24026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24027  # take no chances and rewrite it.
24028  # Note: m4 eats our [], so we need to use [ and ] instead.
24029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24030  if test "x$has_forbidden_chars" != x; then
24031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24035      # Going to short mode and back again did indeed matter. Since short mode is
24036      # case insensitive, let's make it lowercase to improve readability.
24037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24038      # Now convert it back to Unix-style (cygpath)
24039      input_path=`$CYGPATH -u "$shortmode_path"`
24040      new_path="$input_path"
24041    fi
24042  fi
24043
24044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24045  if test "x$test_cygdrive_prefix" = x; then
24046    # As a simple fix, exclude /usr/bin since it's not a real path.
24047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24049      # a path prefixed by /cygdrive for fixpath to work.
24050      new_path="$CYGWIN_ROOT_PATH$input_path"
24051    fi
24052  fi
24053
24054
24055  if test "x$path" != "x$new_path"; then
24056    BOOT_JDK="$new_path"
24057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24058$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24059  fi
24060
24061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24062
24063  path="$BOOT_JDK"
24064  has_colon=`$ECHO $path | $GREP ^.:`
24065  new_path="$path"
24066  if test "x$has_colon" = x; then
24067    # Not in mixed or Windows style, start by that.
24068    new_path=`cmd //c echo $path`
24069  fi
24070
24071
24072  input_path="$new_path"
24073  # Check if we need to convert this using DOS-style short mode. If the path
24074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24075  # take no chances and rewrite it.
24076  # Note: m4 eats our [], so we need to use [ and ] instead.
24077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24078  if test "x$has_forbidden_chars" != x; then
24079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24081  fi
24082
24083
24084  windows_path="$new_path"
24085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24086    unix_path=`$CYGPATH -u "$windows_path"`
24087    new_path="$unix_path"
24088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24090    new_path="$unix_path"
24091  fi
24092
24093  if test "x$path" != "x$new_path"; then
24094    BOOT_JDK="$new_path"
24095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24096$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24097  fi
24098
24099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24101
24102    else
24103      # We're on a unix platform. Hooray! :)
24104      path="$BOOT_JDK"
24105      has_space=`$ECHO "$path" | $GREP " "`
24106      if test "x$has_space" != x; then
24107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24108$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24110      fi
24111
24112      # Use eval to expand a potential ~
24113      eval path="$path"
24114      if test ! -f "$path" && test ! -d "$path"; then
24115        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24116      fi
24117
24118      if test -d "$path"; then
24119        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24120      else
24121        dir="`$DIRNAME "$path"`"
24122        base="`$BASENAME "$path"`"
24123        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24124      fi
24125    fi
24126  fi
24127
24128            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24129$as_echo_n "checking for Boot JDK... " >&6; }
24130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24131$as_echo "$BOOT_JDK" >&6; }
24132            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24133$as_echo_n "checking Boot JDK version... " >&6; }
24134            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24136$as_echo "$BOOT_JDK_VERSION" >&6; }
24137          fi # end check jdk version
24138        fi # end check javac
24139      fi # end check java
24140    fi # end check boot jdk found
24141  fi
24142
24143    # If that did not work out (e.g. too old), try explicit versions instead
24144
24145  if test "x$BOOT_JDK_FOUND" = xno; then
24146    # Now execute the test
24147
24148  if test -x /usr/libexec/java_home; then
24149    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24150    BOOT_JDK_FOUND=maybe
24151    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24152$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24153  fi
24154
24155
24156    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24157    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24158      # Do we have a bin/java?
24159      if test ! -x "$BOOT_JDK/bin/java"; then
24160        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24162        BOOT_JDK_FOUND=no
24163      else
24164        # Do we have a bin/javac?
24165        if test ! -x "$BOOT_JDK/bin/javac"; then
24166          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24168          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24169$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24170          BOOT_JDK_FOUND=no
24171        else
24172          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24173          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24174
24175          # Extra M4 quote needed to protect [] in grep expression.
24176          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24177          if test "x$FOUND_CORRECT_VERSION" = x; then
24178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24180            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24181$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24182            BOOT_JDK_FOUND=no
24183          else
24184            # We're done! :-)
24185            BOOT_JDK_FOUND=yes
24186
24187  # Only process if variable expands to non-empty
24188
24189  if test "x$BOOT_JDK" != x; then
24190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24191
24192  # Input might be given as Windows format, start by converting to
24193  # unix format.
24194  path="$BOOT_JDK"
24195  new_path=`$CYGPATH -u "$path"`
24196
24197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24200  # "foo.exe" is OK but "foo" is an error.
24201  #
24202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24203  # It is also a way to make sure we got the proper file name for the real test later on.
24204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24205  if test "x$test_shortpath" = x; then
24206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24208    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24209  fi
24210
24211  # Call helper function which possibly converts this using DOS-style short mode.
24212  # If so, the updated path is stored in $new_path.
24213
24214  input_path="$new_path"
24215  # Check if we need to convert this using DOS-style short mode. If the path
24216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24217  # take no chances and rewrite it.
24218  # Note: m4 eats our [], so we need to use [ and ] instead.
24219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24220  if test "x$has_forbidden_chars" != x; then
24221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24225      # Going to short mode and back again did indeed matter. Since short mode is
24226      # case insensitive, let's make it lowercase to improve readability.
24227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24228      # Now convert it back to Unix-style (cygpath)
24229      input_path=`$CYGPATH -u "$shortmode_path"`
24230      new_path="$input_path"
24231    fi
24232  fi
24233
24234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24235  if test "x$test_cygdrive_prefix" = x; then
24236    # As a simple fix, exclude /usr/bin since it's not a real path.
24237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24239      # a path prefixed by /cygdrive for fixpath to work.
24240      new_path="$CYGWIN_ROOT_PATH$input_path"
24241    fi
24242  fi
24243
24244
24245  if test "x$path" != "x$new_path"; then
24246    BOOT_JDK="$new_path"
24247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24249  fi
24250
24251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24252
24253  path="$BOOT_JDK"
24254  has_colon=`$ECHO $path | $GREP ^.:`
24255  new_path="$path"
24256  if test "x$has_colon" = x; then
24257    # Not in mixed or Windows style, start by that.
24258    new_path=`cmd //c echo $path`
24259  fi
24260
24261
24262  input_path="$new_path"
24263  # Check if we need to convert this using DOS-style short mode. If the path
24264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24265  # take no chances and rewrite it.
24266  # Note: m4 eats our [], so we need to use [ and ] instead.
24267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24268  if test "x$has_forbidden_chars" != x; then
24269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24271  fi
24272
24273
24274  windows_path="$new_path"
24275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24276    unix_path=`$CYGPATH -u "$windows_path"`
24277    new_path="$unix_path"
24278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24280    new_path="$unix_path"
24281  fi
24282
24283  if test "x$path" != "x$new_path"; then
24284    BOOT_JDK="$new_path"
24285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24287  fi
24288
24289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24291
24292    else
24293      # We're on a unix platform. Hooray! :)
24294      path="$BOOT_JDK"
24295      has_space=`$ECHO "$path" | $GREP " "`
24296      if test "x$has_space" != x; then
24297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24300      fi
24301
24302      # Use eval to expand a potential ~
24303      eval path="$path"
24304      if test ! -f "$path" && test ! -d "$path"; then
24305        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24306      fi
24307
24308      if test -d "$path"; then
24309        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24310      else
24311        dir="`$DIRNAME "$path"`"
24312        base="`$BASENAME "$path"`"
24313        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24314      fi
24315    fi
24316  fi
24317
24318            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24319$as_echo_n "checking for Boot JDK... " >&6; }
24320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24321$as_echo "$BOOT_JDK" >&6; }
24322            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24323$as_echo_n "checking Boot JDK version... " >&6; }
24324            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24326$as_echo "$BOOT_JDK_VERSION" >&6; }
24327          fi # end check jdk version
24328        fi # end check javac
24329      fi # end check java
24330    fi # end check boot jdk found
24331  fi
24332
24333
24334  if test "x$BOOT_JDK_FOUND" = xno; then
24335    # Now execute the test
24336
24337  if test -x /usr/libexec/java_home; then
24338    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24339    BOOT_JDK_FOUND=maybe
24340    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24341$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24342  fi
24343
24344
24345    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24346    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24347      # Do we have a bin/java?
24348      if test ! -x "$BOOT_JDK/bin/java"; then
24349        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24351        BOOT_JDK_FOUND=no
24352      else
24353        # Do we have a bin/javac?
24354        if test ! -x "$BOOT_JDK/bin/javac"; then
24355          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24357          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24358$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24359          BOOT_JDK_FOUND=no
24360        else
24361          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24362          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24363
24364          # Extra M4 quote needed to protect [] in grep expression.
24365          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24366          if test "x$FOUND_CORRECT_VERSION" = x; then
24367            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24369            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24370$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24371            BOOT_JDK_FOUND=no
24372          else
24373            # We're done! :-)
24374            BOOT_JDK_FOUND=yes
24375
24376  # Only process if variable expands to non-empty
24377
24378  if test "x$BOOT_JDK" != x; then
24379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24380
24381  # Input might be given as Windows format, start by converting to
24382  # unix format.
24383  path="$BOOT_JDK"
24384  new_path=`$CYGPATH -u "$path"`
24385
24386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24389  # "foo.exe" is OK but "foo" is an error.
24390  #
24391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24392  # It is also a way to make sure we got the proper file name for the real test later on.
24393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24394  if test "x$test_shortpath" = x; then
24395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24396$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24397    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24398  fi
24399
24400  # Call helper function which possibly converts this using DOS-style short mode.
24401  # If so, the updated path is stored in $new_path.
24402
24403  input_path="$new_path"
24404  # Check if we need to convert this using DOS-style short mode. If the path
24405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24406  # take no chances and rewrite it.
24407  # Note: m4 eats our [], so we need to use [ and ] instead.
24408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24409  if test "x$has_forbidden_chars" != x; then
24410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24414      # Going to short mode and back again did indeed matter. Since short mode is
24415      # case insensitive, let's make it lowercase to improve readability.
24416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24417      # Now convert it back to Unix-style (cygpath)
24418      input_path=`$CYGPATH -u "$shortmode_path"`
24419      new_path="$input_path"
24420    fi
24421  fi
24422
24423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24424  if test "x$test_cygdrive_prefix" = x; then
24425    # As a simple fix, exclude /usr/bin since it's not a real path.
24426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24428      # a path prefixed by /cygdrive for fixpath to work.
24429      new_path="$CYGWIN_ROOT_PATH$input_path"
24430    fi
24431  fi
24432
24433
24434  if test "x$path" != "x$new_path"; then
24435    BOOT_JDK="$new_path"
24436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24438  fi
24439
24440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24441
24442  path="$BOOT_JDK"
24443  has_colon=`$ECHO $path | $GREP ^.:`
24444  new_path="$path"
24445  if test "x$has_colon" = x; then
24446    # Not in mixed or Windows style, start by that.
24447    new_path=`cmd //c echo $path`
24448  fi
24449
24450
24451  input_path="$new_path"
24452  # Check if we need to convert this using DOS-style short mode. If the path
24453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24454  # take no chances and rewrite it.
24455  # Note: m4 eats our [], so we need to use [ and ] instead.
24456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24457  if test "x$has_forbidden_chars" != x; then
24458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24460  fi
24461
24462
24463  windows_path="$new_path"
24464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24465    unix_path=`$CYGPATH -u "$windows_path"`
24466    new_path="$unix_path"
24467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24469    new_path="$unix_path"
24470  fi
24471
24472  if test "x$path" != "x$new_path"; then
24473    BOOT_JDK="$new_path"
24474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24475$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24476  fi
24477
24478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24480
24481    else
24482      # We're on a unix platform. Hooray! :)
24483      path="$BOOT_JDK"
24484      has_space=`$ECHO "$path" | $GREP " "`
24485      if test "x$has_space" != x; then
24486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24489      fi
24490
24491      # Use eval to expand a potential ~
24492      eval path="$path"
24493      if test ! -f "$path" && test ! -d "$path"; then
24494        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24495      fi
24496
24497      if test -d "$path"; then
24498        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24499      else
24500        dir="`$DIRNAME "$path"`"
24501        base="`$BASENAME "$path"`"
24502        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24503      fi
24504    fi
24505  fi
24506
24507            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24508$as_echo_n "checking for Boot JDK... " >&6; }
24509            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24510$as_echo "$BOOT_JDK" >&6; }
24511            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24512$as_echo_n "checking Boot JDK version... " >&6; }
24513            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24515$as_echo "$BOOT_JDK_VERSION" >&6; }
24516          fi # end check jdk version
24517        fi # end check javac
24518      fi # end check java
24519    fi # end check boot jdk found
24520  fi
24521
24522
24523  if test "x$BOOT_JDK_FOUND" = xno; then
24524    # Now execute the test
24525
24526  if test -x /usr/libexec/java_home; then
24527    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24528    BOOT_JDK_FOUND=maybe
24529    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24530$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24531  fi
24532
24533
24534    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24535    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24536      # Do we have a bin/java?
24537      if test ! -x "$BOOT_JDK/bin/java"; then
24538        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24540        BOOT_JDK_FOUND=no
24541      else
24542        # Do we have a bin/javac?
24543        if test ! -x "$BOOT_JDK/bin/javac"; then
24544          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24546          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24547$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24548          BOOT_JDK_FOUND=no
24549        else
24550          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24551          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24552
24553          # Extra M4 quote needed to protect [] in grep expression.
24554          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24555          if test "x$FOUND_CORRECT_VERSION" = x; then
24556            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24558            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24559$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24560            BOOT_JDK_FOUND=no
24561          else
24562            # We're done! :-)
24563            BOOT_JDK_FOUND=yes
24564
24565  # Only process if variable expands to non-empty
24566
24567  if test "x$BOOT_JDK" != x; then
24568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24569
24570  # Input might be given as Windows format, start by converting to
24571  # unix format.
24572  path="$BOOT_JDK"
24573  new_path=`$CYGPATH -u "$path"`
24574
24575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24578  # "foo.exe" is OK but "foo" is an error.
24579  #
24580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24581  # It is also a way to make sure we got the proper file name for the real test later on.
24582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24583  if test "x$test_shortpath" = x; then
24584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24586    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24587  fi
24588
24589  # Call helper function which possibly converts this using DOS-style short mode.
24590  # If so, the updated path is stored in $new_path.
24591
24592  input_path="$new_path"
24593  # Check if we need to convert this using DOS-style short mode. If the path
24594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24595  # take no chances and rewrite it.
24596  # Note: m4 eats our [], so we need to use [ and ] instead.
24597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24598  if test "x$has_forbidden_chars" != x; then
24599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24603      # Going to short mode and back again did indeed matter. Since short mode is
24604      # case insensitive, let's make it lowercase to improve readability.
24605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24606      # Now convert it back to Unix-style (cygpath)
24607      input_path=`$CYGPATH -u "$shortmode_path"`
24608      new_path="$input_path"
24609    fi
24610  fi
24611
24612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24613  if test "x$test_cygdrive_prefix" = x; then
24614    # As a simple fix, exclude /usr/bin since it's not a real path.
24615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24617      # a path prefixed by /cygdrive for fixpath to work.
24618      new_path="$CYGWIN_ROOT_PATH$input_path"
24619    fi
24620  fi
24621
24622
24623  if test "x$path" != "x$new_path"; then
24624    BOOT_JDK="$new_path"
24625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24626$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24627  fi
24628
24629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24630
24631  path="$BOOT_JDK"
24632  has_colon=`$ECHO $path | $GREP ^.:`
24633  new_path="$path"
24634  if test "x$has_colon" = x; then
24635    # Not in mixed or Windows style, start by that.
24636    new_path=`cmd //c echo $path`
24637  fi
24638
24639
24640  input_path="$new_path"
24641  # Check if we need to convert this using DOS-style short mode. If the path
24642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24643  # take no chances and rewrite it.
24644  # Note: m4 eats our [], so we need to use [ and ] instead.
24645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24646  if test "x$has_forbidden_chars" != x; then
24647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24649  fi
24650
24651
24652  windows_path="$new_path"
24653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24654    unix_path=`$CYGPATH -u "$windows_path"`
24655    new_path="$unix_path"
24656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24658    new_path="$unix_path"
24659  fi
24660
24661  if test "x$path" != "x$new_path"; then
24662    BOOT_JDK="$new_path"
24663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24665  fi
24666
24667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24669
24670    else
24671      # We're on a unix platform. Hooray! :)
24672      path="$BOOT_JDK"
24673      has_space=`$ECHO "$path" | $GREP " "`
24674      if test "x$has_space" != x; then
24675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24676$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24678      fi
24679
24680      # Use eval to expand a potential ~
24681      eval path="$path"
24682      if test ! -f "$path" && test ! -d "$path"; then
24683        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24684      fi
24685
24686      if test -d "$path"; then
24687        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24688      else
24689        dir="`$DIRNAME "$path"`"
24690        base="`$BASENAME "$path"`"
24691        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24692      fi
24693    fi
24694  fi
24695
24696            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24697$as_echo_n "checking for Boot JDK... " >&6; }
24698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24699$as_echo "$BOOT_JDK" >&6; }
24700            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24701$as_echo_n "checking Boot JDK version... " >&6; }
24702            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24704$as_echo "$BOOT_JDK_VERSION" >&6; }
24705          fi # end check jdk version
24706        fi # end check javac
24707      fi # end check java
24708    fi # end check boot jdk found
24709  fi
24710
24711  fi
24712
24713
24714    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24715    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24716      # Do we have a bin/java?
24717      if test ! -x "$BOOT_JDK/bin/java"; then
24718        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24720        BOOT_JDK_FOUND=no
24721      else
24722        # Do we have a bin/javac?
24723        if test ! -x "$BOOT_JDK/bin/javac"; then
24724          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24725$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24726          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24727$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24728          BOOT_JDK_FOUND=no
24729        else
24730          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24731          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24732
24733          # Extra M4 quote needed to protect [] in grep expression.
24734          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24735          if test "x$FOUND_CORRECT_VERSION" = x; then
24736            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24738            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24739$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24740            BOOT_JDK_FOUND=no
24741          else
24742            # We're done! :-)
24743            BOOT_JDK_FOUND=yes
24744
24745  # Only process if variable expands to non-empty
24746
24747  if test "x$BOOT_JDK" != x; then
24748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24749
24750  # Input might be given as Windows format, start by converting to
24751  # unix format.
24752  path="$BOOT_JDK"
24753  new_path=`$CYGPATH -u "$path"`
24754
24755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24758  # "foo.exe" is OK but "foo" is an error.
24759  #
24760  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24761  # It is also a way to make sure we got the proper file name for the real test later on.
24762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24763  if test "x$test_shortpath" = x; then
24764    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24765$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24766    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24767  fi
24768
24769  # Call helper function which possibly converts this using DOS-style short mode.
24770  # If so, the updated path is stored in $new_path.
24771
24772  input_path="$new_path"
24773  # Check if we need to convert this using DOS-style short mode. If the path
24774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24775  # take no chances and rewrite it.
24776  # Note: m4 eats our [], so we need to use [ and ] instead.
24777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24778  if test "x$has_forbidden_chars" != x; then
24779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24783      # Going to short mode and back again did indeed matter. Since short mode is
24784      # case insensitive, let's make it lowercase to improve readability.
24785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24786      # Now convert it back to Unix-style (cygpath)
24787      input_path=`$CYGPATH -u "$shortmode_path"`
24788      new_path="$input_path"
24789    fi
24790  fi
24791
24792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24793  if test "x$test_cygdrive_prefix" = x; then
24794    # As a simple fix, exclude /usr/bin since it's not a real path.
24795    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24797      # a path prefixed by /cygdrive for fixpath to work.
24798      new_path="$CYGWIN_ROOT_PATH$input_path"
24799    fi
24800  fi
24801
24802
24803  if test "x$path" != "x$new_path"; then
24804    BOOT_JDK="$new_path"
24805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24806$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24807  fi
24808
24809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24810
24811  path="$BOOT_JDK"
24812  has_colon=`$ECHO $path | $GREP ^.:`
24813  new_path="$path"
24814  if test "x$has_colon" = x; then
24815    # Not in mixed or Windows style, start by that.
24816    new_path=`cmd //c echo $path`
24817  fi
24818
24819
24820  input_path="$new_path"
24821  # Check if we need to convert this using DOS-style short mode. If the path
24822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24823  # take no chances and rewrite it.
24824  # Note: m4 eats our [], so we need to use [ and ] instead.
24825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24826  if test "x$has_forbidden_chars" != x; then
24827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24829  fi
24830
24831
24832  windows_path="$new_path"
24833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24834    unix_path=`$CYGPATH -u "$windows_path"`
24835    new_path="$unix_path"
24836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24838    new_path="$unix_path"
24839  fi
24840
24841  if test "x$path" != "x$new_path"; then
24842    BOOT_JDK="$new_path"
24843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24844$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24845  fi
24846
24847  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24848  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24849
24850    else
24851      # We're on a unix platform. Hooray! :)
24852      path="$BOOT_JDK"
24853      has_space=`$ECHO "$path" | $GREP " "`
24854      if test "x$has_space" != x; then
24855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24856$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24857        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24858      fi
24859
24860      # Use eval to expand a potential ~
24861      eval path="$path"
24862      if test ! -f "$path" && test ! -d "$path"; then
24863        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24864      fi
24865
24866      if test -d "$path"; then
24867        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24868      else
24869        dir="`$DIRNAME "$path"`"
24870        base="`$BASENAME "$path"`"
24871        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24872      fi
24873    fi
24874  fi
24875
24876            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24877$as_echo_n "checking for Boot JDK... " >&6; }
24878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24879$as_echo "$BOOT_JDK" >&6; }
24880            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24881$as_echo_n "checking Boot JDK version... " >&6; }
24882            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24884$as_echo "$BOOT_JDK_VERSION" >&6; }
24885          fi # end check jdk version
24886        fi # end check javac
24887      fi # end check java
24888    fi # end check boot jdk found
24889  fi
24890
24891
24892  # Test: Is $JAVA_HOME set?
24893
24894  if test "x$BOOT_JDK_FOUND" = xno; then
24895    # Now execute the test
24896
24897  if test "x$JAVA_HOME" != x; then
24898    JAVA_HOME_PROCESSED="$JAVA_HOME"
24899
24900  # Only process if variable expands to non-empty
24901
24902  if test "x$JAVA_HOME_PROCESSED" != x; then
24903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24904
24905  # Input might be given as Windows format, start by converting to
24906  # unix format.
24907  path="$JAVA_HOME_PROCESSED"
24908  new_path=`$CYGPATH -u "$path"`
24909
24910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24913  # "foo.exe" is OK but "foo" is an error.
24914  #
24915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24916  # It is also a way to make sure we got the proper file name for the real test later on.
24917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24918  if test "x$test_shortpath" = x; then
24919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24920$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24921    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24922  fi
24923
24924  # Call helper function which possibly converts this using DOS-style short mode.
24925  # If so, the updated path is stored in $new_path.
24926
24927  input_path="$new_path"
24928  # Check if we need to convert this using DOS-style short mode. If the path
24929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24930  # take no chances and rewrite it.
24931  # Note: m4 eats our [], so we need to use [ and ] instead.
24932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24933  if test "x$has_forbidden_chars" != x; then
24934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24938      # Going to short mode and back again did indeed matter. Since short mode is
24939      # case insensitive, let's make it lowercase to improve readability.
24940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24941      # Now convert it back to Unix-style (cygpath)
24942      input_path=`$CYGPATH -u "$shortmode_path"`
24943      new_path="$input_path"
24944    fi
24945  fi
24946
24947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24948  if test "x$test_cygdrive_prefix" = x; then
24949    # As a simple fix, exclude /usr/bin since it's not a real path.
24950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24952      # a path prefixed by /cygdrive for fixpath to work.
24953      new_path="$CYGWIN_ROOT_PATH$input_path"
24954    fi
24955  fi
24956
24957
24958  if test "x$path" != "x$new_path"; then
24959    JAVA_HOME_PROCESSED="$new_path"
24960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24961$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24962  fi
24963
24964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24965
24966  path="$JAVA_HOME_PROCESSED"
24967  has_colon=`$ECHO $path | $GREP ^.:`
24968  new_path="$path"
24969  if test "x$has_colon" = x; then
24970    # Not in mixed or Windows style, start by that.
24971    new_path=`cmd //c echo $path`
24972  fi
24973
24974
24975  input_path="$new_path"
24976  # Check if we need to convert this using DOS-style short mode. If the path
24977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24978  # take no chances and rewrite it.
24979  # Note: m4 eats our [], so we need to use [ and ] instead.
24980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24981  if test "x$has_forbidden_chars" != x; then
24982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24984  fi
24985
24986
24987  windows_path="$new_path"
24988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24989    unix_path=`$CYGPATH -u "$windows_path"`
24990    new_path="$unix_path"
24991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24993    new_path="$unix_path"
24994  fi
24995
24996  if test "x$path" != "x$new_path"; then
24997    JAVA_HOME_PROCESSED="$new_path"
24998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24999$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25000  fi
25001
25002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25004
25005    else
25006      # We're on a unix platform. Hooray! :)
25007      path="$JAVA_HOME_PROCESSED"
25008      has_space=`$ECHO "$path" | $GREP " "`
25009      if test "x$has_space" != x; then
25010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25011$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25012        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25013      fi
25014
25015      # Use eval to expand a potential ~
25016      eval path="$path"
25017      if test ! -f "$path" && test ! -d "$path"; then
25018        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25019      fi
25020
25021      if test -d "$path"; then
25022        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25023      else
25024        dir="`$DIRNAME "$path"`"
25025        base="`$BASENAME "$path"`"
25026        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25027      fi
25028    fi
25029  fi
25030
25031    if test ! -d "$JAVA_HOME_PROCESSED"; then
25032      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25033$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25034    else
25035      # Aha, the user has set a JAVA_HOME
25036      # let us use that as the Boot JDK.
25037      BOOT_JDK="$JAVA_HOME_PROCESSED"
25038      BOOT_JDK_FOUND=maybe
25039      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25040$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25041    fi
25042  fi
25043
25044
25045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25047      # Do we have a bin/java?
25048      if test ! -x "$BOOT_JDK/bin/java"; then
25049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25051        BOOT_JDK_FOUND=no
25052      else
25053        # Do we have a bin/javac?
25054        if test ! -x "$BOOT_JDK/bin/javac"; then
25055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25059          BOOT_JDK_FOUND=no
25060        else
25061          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25062          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25063
25064          # Extra M4 quote needed to protect [] in grep expression.
25065          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25066          if test "x$FOUND_CORRECT_VERSION" = x; then
25067            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25069            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25070$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25071            BOOT_JDK_FOUND=no
25072          else
25073            # We're done! :-)
25074            BOOT_JDK_FOUND=yes
25075
25076  # Only process if variable expands to non-empty
25077
25078  if test "x$BOOT_JDK" != x; then
25079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25080
25081  # Input might be given as Windows format, start by converting to
25082  # unix format.
25083  path="$BOOT_JDK"
25084  new_path=`$CYGPATH -u "$path"`
25085
25086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25089  # "foo.exe" is OK but "foo" is an error.
25090  #
25091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25092  # It is also a way to make sure we got the proper file name for the real test later on.
25093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25094  if test "x$test_shortpath" = x; then
25095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25096$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25097    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25098  fi
25099
25100  # Call helper function which possibly converts this using DOS-style short mode.
25101  # If so, the updated path is stored in $new_path.
25102
25103  input_path="$new_path"
25104  # Check if we need to convert this using DOS-style short mode. If the path
25105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25106  # take no chances and rewrite it.
25107  # Note: m4 eats our [], so we need to use [ and ] instead.
25108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25109  if test "x$has_forbidden_chars" != x; then
25110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25114      # Going to short mode and back again did indeed matter. Since short mode is
25115      # case insensitive, let's make it lowercase to improve readability.
25116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25117      # Now convert it back to Unix-style (cygpath)
25118      input_path=`$CYGPATH -u "$shortmode_path"`
25119      new_path="$input_path"
25120    fi
25121  fi
25122
25123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25124  if test "x$test_cygdrive_prefix" = x; then
25125    # As a simple fix, exclude /usr/bin since it's not a real path.
25126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25128      # a path prefixed by /cygdrive for fixpath to work.
25129      new_path="$CYGWIN_ROOT_PATH$input_path"
25130    fi
25131  fi
25132
25133
25134  if test "x$path" != "x$new_path"; then
25135    BOOT_JDK="$new_path"
25136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25138  fi
25139
25140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25141
25142  path="$BOOT_JDK"
25143  has_colon=`$ECHO $path | $GREP ^.:`
25144  new_path="$path"
25145  if test "x$has_colon" = x; then
25146    # Not in mixed or Windows style, start by that.
25147    new_path=`cmd //c echo $path`
25148  fi
25149
25150
25151  input_path="$new_path"
25152  # Check if we need to convert this using DOS-style short mode. If the path
25153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25154  # take no chances and rewrite it.
25155  # Note: m4 eats our [], so we need to use [ and ] instead.
25156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25157  if test "x$has_forbidden_chars" != x; then
25158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25160  fi
25161
25162
25163  windows_path="$new_path"
25164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25165    unix_path=`$CYGPATH -u "$windows_path"`
25166    new_path="$unix_path"
25167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25169    new_path="$unix_path"
25170  fi
25171
25172  if test "x$path" != "x$new_path"; then
25173    BOOT_JDK="$new_path"
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25176  fi
25177
25178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25180
25181    else
25182      # We're on a unix platform. Hooray! :)
25183      path="$BOOT_JDK"
25184      has_space=`$ECHO "$path" | $GREP " "`
25185      if test "x$has_space" != x; then
25186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25189      fi
25190
25191      # Use eval to expand a potential ~
25192      eval path="$path"
25193      if test ! -f "$path" && test ! -d "$path"; then
25194        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25195      fi
25196
25197      if test -d "$path"; then
25198        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25199      else
25200        dir="`$DIRNAME "$path"`"
25201        base="`$BASENAME "$path"`"
25202        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25203      fi
25204    fi
25205  fi
25206
25207            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25208$as_echo_n "checking for Boot JDK... " >&6; }
25209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25210$as_echo "$BOOT_JDK" >&6; }
25211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25212$as_echo_n "checking Boot JDK version... " >&6; }
25213            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25215$as_echo "$BOOT_JDK_VERSION" >&6; }
25216          fi # end check jdk version
25217        fi # end check javac
25218      fi # end check java
25219    fi # end check boot jdk found
25220  fi
25221
25222
25223  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25224
25225  if test "x$BOOT_JDK_FOUND" = xno; then
25226    # Now execute the test
25227
25228  # Extract the first word of "javac", so it can be a program name with args.
25229set dummy javac; ac_word=$2
25230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25231$as_echo_n "checking for $ac_word... " >&6; }
25232if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25233  $as_echo_n "(cached) " >&6
25234else
25235  case $JAVAC_CHECK in
25236  [\\/]* | ?:[\\/]*)
25237  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25238  ;;
25239  *)
25240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25241for as_dir in $PATH
25242do
25243  IFS=$as_save_IFS
25244  test -z "$as_dir" && as_dir=.
25245    for ac_exec_ext in '' $ac_executable_extensions; do
25246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25247    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25249    break 2
25250  fi
25251done
25252  done
25253IFS=$as_save_IFS
25254
25255  ;;
25256esac
25257fi
25258JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25259if test -n "$JAVAC_CHECK"; then
25260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25261$as_echo "$JAVAC_CHECK" >&6; }
25262else
25263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25264$as_echo "no" >&6; }
25265fi
25266
25267
25268  # Extract the first word of "java", so it can be a program name with args.
25269set dummy java; ac_word=$2
25270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25271$as_echo_n "checking for $ac_word... " >&6; }
25272if ${ac_cv_path_JAVA_CHECK+:} false; then :
25273  $as_echo_n "(cached) " >&6
25274else
25275  case $JAVA_CHECK in
25276  [\\/]* | ?:[\\/]*)
25277  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25278  ;;
25279  *)
25280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25281for as_dir in $PATH
25282do
25283  IFS=$as_save_IFS
25284  test -z "$as_dir" && as_dir=.
25285    for ac_exec_ext in '' $ac_executable_extensions; do
25286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25287    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25289    break 2
25290  fi
25291done
25292  done
25293IFS=$as_save_IFS
25294
25295  ;;
25296esac
25297fi
25298JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25299if test -n "$JAVA_CHECK"; then
25300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25301$as_echo "$JAVA_CHECK" >&6; }
25302else
25303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25304$as_echo "no" >&6; }
25305fi
25306
25307
25308  BINARY="$JAVAC_CHECK"
25309  if test "x$JAVAC_CHECK" = x; then
25310    BINARY="$JAVA_CHECK"
25311  fi
25312  if test "x$BINARY" != x; then
25313    # So there is a java(c) binary, it might be part of a JDK.
25314    # Lets find the JDK/JRE directory by following symbolic links.
25315    # Linux/GNU systems often have links from /usr/bin/java to
25316    # /etc/alternatives/java to the real JDK binary.
25317
25318  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25319    # Follow a chain of symbolic links. Use readlink
25320    # where it exists, else fall back to horribly
25321    # complicated shell code.
25322    if test "x$READLINK_TESTED" != yes; then
25323      # On MacOSX there is a readlink tool with a different
25324      # purpose than the GNU readlink tool. Check the found readlink.
25325      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25326      if test "x$ISGNU" = x; then
25327        # A readlink that we do not know how to use.
25328        # Are there other non-GNU readlinks out there?
25329        READLINK_TESTED=yes
25330        READLINK=
25331      fi
25332    fi
25333
25334    if test "x$READLINK" != x; then
25335      BINARY=`$READLINK -f $BINARY`
25336    else
25337      # Save the current directory for restoring afterwards
25338      STARTDIR=$PWD
25339      COUNTER=0
25340      sym_link_dir=`$DIRNAME $BINARY`
25341      sym_link_file=`$BASENAME $BINARY`
25342      cd $sym_link_dir
25343      # Use -P flag to resolve symlinks in directories.
25344      cd `$THEPWDCMD -P`
25345      sym_link_dir=`$THEPWDCMD -P`
25346      # Resolve file symlinks
25347      while test $COUNTER -lt 20; do
25348        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25349        if test "x$ISLINK" == x; then
25350          # This is not a symbolic link! We are done!
25351          break
25352        fi
25353        # Again resolve directory symlinks since the target of the just found
25354        # link could be in a different directory
25355        cd `$DIRNAME $ISLINK`
25356        sym_link_dir=`$THEPWDCMD -P`
25357        sym_link_file=`$BASENAME $ISLINK`
25358        let COUNTER=COUNTER+1
25359      done
25360      cd $STARTDIR
25361      BINARY=$sym_link_dir/$sym_link_file
25362    fi
25363  fi
25364
25365    BOOT_JDK=`dirname "$BINARY"`
25366    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25367    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25368      # Looks like we found ourselves an JDK
25369      BOOT_JDK_FOUND=maybe
25370      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25371$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25372    fi
25373  fi
25374
25375
25376    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25377    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25378      # Do we have a bin/java?
25379      if test ! -x "$BOOT_JDK/bin/java"; then
25380        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25382        BOOT_JDK_FOUND=no
25383      else
25384        # Do we have a bin/javac?
25385        if test ! -x "$BOOT_JDK/bin/javac"; then
25386          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25388          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25389$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25390          BOOT_JDK_FOUND=no
25391        else
25392          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25393          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25394
25395          # Extra M4 quote needed to protect [] in grep expression.
25396          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25397          if test "x$FOUND_CORRECT_VERSION" = x; then
25398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25400            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25401$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25402            BOOT_JDK_FOUND=no
25403          else
25404            # We're done! :-)
25405            BOOT_JDK_FOUND=yes
25406
25407  # Only process if variable expands to non-empty
25408
25409  if test "x$BOOT_JDK" != x; then
25410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25411
25412  # Input might be given as Windows format, start by converting to
25413  # unix format.
25414  path="$BOOT_JDK"
25415  new_path=`$CYGPATH -u "$path"`
25416
25417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25420  # "foo.exe" is OK but "foo" is an error.
25421  #
25422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25423  # It is also a way to make sure we got the proper file name for the real test later on.
25424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25425  if test "x$test_shortpath" = x; then
25426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25428    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25429  fi
25430
25431  # Call helper function which possibly converts this using DOS-style short mode.
25432  # If so, the updated path is stored in $new_path.
25433
25434  input_path="$new_path"
25435  # Check if we need to convert this using DOS-style short mode. If the path
25436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25437  # take no chances and rewrite it.
25438  # Note: m4 eats our [], so we need to use [ and ] instead.
25439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25440  if test "x$has_forbidden_chars" != x; then
25441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25445      # Going to short mode and back again did indeed matter. Since short mode is
25446      # case insensitive, let's make it lowercase to improve readability.
25447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25448      # Now convert it back to Unix-style (cygpath)
25449      input_path=`$CYGPATH -u "$shortmode_path"`
25450      new_path="$input_path"
25451    fi
25452  fi
25453
25454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25455  if test "x$test_cygdrive_prefix" = x; then
25456    # As a simple fix, exclude /usr/bin since it's not a real path.
25457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25459      # a path prefixed by /cygdrive for fixpath to work.
25460      new_path="$CYGWIN_ROOT_PATH$input_path"
25461    fi
25462  fi
25463
25464
25465  if test "x$path" != "x$new_path"; then
25466    BOOT_JDK="$new_path"
25467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25469  fi
25470
25471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25472
25473  path="$BOOT_JDK"
25474  has_colon=`$ECHO $path | $GREP ^.:`
25475  new_path="$path"
25476  if test "x$has_colon" = x; then
25477    # Not in mixed or Windows style, start by that.
25478    new_path=`cmd //c echo $path`
25479  fi
25480
25481
25482  input_path="$new_path"
25483  # Check if we need to convert this using DOS-style short mode. If the path
25484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25485  # take no chances and rewrite it.
25486  # Note: m4 eats our [], so we need to use [ and ] instead.
25487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25488  if test "x$has_forbidden_chars" != x; then
25489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25491  fi
25492
25493
25494  windows_path="$new_path"
25495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25496    unix_path=`$CYGPATH -u "$windows_path"`
25497    new_path="$unix_path"
25498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25500    new_path="$unix_path"
25501  fi
25502
25503  if test "x$path" != "x$new_path"; then
25504    BOOT_JDK="$new_path"
25505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25506$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25507  fi
25508
25509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25511
25512    else
25513      # We're on a unix platform. Hooray! :)
25514      path="$BOOT_JDK"
25515      has_space=`$ECHO "$path" | $GREP " "`
25516      if test "x$has_space" != x; then
25517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25520      fi
25521
25522      # Use eval to expand a potential ~
25523      eval path="$path"
25524      if test ! -f "$path" && test ! -d "$path"; then
25525        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25526      fi
25527
25528      if test -d "$path"; then
25529        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25530      else
25531        dir="`$DIRNAME "$path"`"
25532        base="`$BASENAME "$path"`"
25533        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25534      fi
25535    fi
25536  fi
25537
25538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25539$as_echo_n "checking for Boot JDK... " >&6; }
25540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25541$as_echo "$BOOT_JDK" >&6; }
25542            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25543$as_echo_n "checking Boot JDK version... " >&6; }
25544            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25546$as_echo "$BOOT_JDK_VERSION" >&6; }
25547          fi # end check jdk version
25548        fi # end check javac
25549      fi # end check java
25550    fi # end check boot jdk found
25551  fi
25552
25553
25554  # Test: Is there a JDK installed in default, well-known locations?
25555
25556  if test "x$BOOT_JDK_FOUND" = xno; then
25557    # Now execute the test
25558
25559  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25560
25561  if test "x$BOOT_JDK_FOUND" = xno; then
25562    # Now execute the test
25563
25564  if test "x$ProgramW6432" != x; then
25565    VIRTUAL_DIR="$ProgramW6432/Java"
25566
25567  windows_path="$VIRTUAL_DIR"
25568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25569    unix_path=`$CYGPATH -u "$windows_path"`
25570    VIRTUAL_DIR="$unix_path"
25571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25573    VIRTUAL_DIR="$unix_path"
25574  fi
25575
25576
25577  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25578  BOOT_JDK_SUFFIX=""
25579  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25580  if test "x$ALL_JDKS_FOUND" != x; then
25581    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25582
25583  if test "x$BOOT_JDK_FOUND" = xno; then
25584    # Now execute the test
25585
25586        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25587        if test -d "$BOOT_JDK"; then
25588          BOOT_JDK_FOUND=maybe
25589          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25590$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25591        fi
25592
25593
25594    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25595    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25596      # Do we have a bin/java?
25597      if test ! -x "$BOOT_JDK/bin/java"; then
25598        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25600        BOOT_JDK_FOUND=no
25601      else
25602        # Do we have a bin/javac?
25603        if test ! -x "$BOOT_JDK/bin/javac"; then
25604          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25606          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25607$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25608          BOOT_JDK_FOUND=no
25609        else
25610          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25611          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25612
25613          # Extra M4 quote needed to protect [] in grep expression.
25614          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25615          if test "x$FOUND_CORRECT_VERSION" = x; then
25616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25618            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25619$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25620            BOOT_JDK_FOUND=no
25621          else
25622            # We're done! :-)
25623            BOOT_JDK_FOUND=yes
25624
25625  # Only process if variable expands to non-empty
25626
25627  if test "x$BOOT_JDK" != x; then
25628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25629
25630  # Input might be given as Windows format, start by converting to
25631  # unix format.
25632  path="$BOOT_JDK"
25633  new_path=`$CYGPATH -u "$path"`
25634
25635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25638  # "foo.exe" is OK but "foo" is an error.
25639  #
25640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25641  # It is also a way to make sure we got the proper file name for the real test later on.
25642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25643  if test "x$test_shortpath" = x; then
25644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25646    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25647  fi
25648
25649  # Call helper function which possibly converts this using DOS-style short mode.
25650  # If so, the updated path is stored in $new_path.
25651
25652  input_path="$new_path"
25653  # Check if we need to convert this using DOS-style short mode. If the path
25654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25655  # take no chances and rewrite it.
25656  # Note: m4 eats our [], so we need to use [ and ] instead.
25657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25658  if test "x$has_forbidden_chars" != x; then
25659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25663      # Going to short mode and back again did indeed matter. Since short mode is
25664      # case insensitive, let's make it lowercase to improve readability.
25665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25666      # Now convert it back to Unix-style (cygpath)
25667      input_path=`$CYGPATH -u "$shortmode_path"`
25668      new_path="$input_path"
25669    fi
25670  fi
25671
25672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25673  if test "x$test_cygdrive_prefix" = x; then
25674    # As a simple fix, exclude /usr/bin since it's not a real path.
25675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25677      # a path prefixed by /cygdrive for fixpath to work.
25678      new_path="$CYGWIN_ROOT_PATH$input_path"
25679    fi
25680  fi
25681
25682
25683  if test "x$path" != "x$new_path"; then
25684    BOOT_JDK="$new_path"
25685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25687  fi
25688
25689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25690
25691  path="$BOOT_JDK"
25692  has_colon=`$ECHO $path | $GREP ^.:`
25693  new_path="$path"
25694  if test "x$has_colon" = x; then
25695    # Not in mixed or Windows style, start by that.
25696    new_path=`cmd //c echo $path`
25697  fi
25698
25699
25700  input_path="$new_path"
25701  # Check if we need to convert this using DOS-style short mode. If the path
25702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25703  # take no chances and rewrite it.
25704  # Note: m4 eats our [], so we need to use [ and ] instead.
25705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25706  if test "x$has_forbidden_chars" != x; then
25707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25709  fi
25710
25711
25712  windows_path="$new_path"
25713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25714    unix_path=`$CYGPATH -u "$windows_path"`
25715    new_path="$unix_path"
25716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25718    new_path="$unix_path"
25719  fi
25720
25721  if test "x$path" != "x$new_path"; then
25722    BOOT_JDK="$new_path"
25723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25725  fi
25726
25727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25729
25730    else
25731      # We're on a unix platform. Hooray! :)
25732      path="$BOOT_JDK"
25733      has_space=`$ECHO "$path" | $GREP " "`
25734      if test "x$has_space" != x; then
25735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25738      fi
25739
25740      # Use eval to expand a potential ~
25741      eval path="$path"
25742      if test ! -f "$path" && test ! -d "$path"; then
25743        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25744      fi
25745
25746      if test -d "$path"; then
25747        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25748      else
25749        dir="`$DIRNAME "$path"`"
25750        base="`$BASENAME "$path"`"
25751        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25752      fi
25753    fi
25754  fi
25755
25756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25757$as_echo_n "checking for Boot JDK... " >&6; }
25758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25759$as_echo "$BOOT_JDK" >&6; }
25760            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25761$as_echo_n "checking Boot JDK version... " >&6; }
25762            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25764$as_echo "$BOOT_JDK_VERSION" >&6; }
25765          fi # end check jdk version
25766        fi # end check javac
25767      fi # end check java
25768    fi # end check boot jdk found
25769  fi
25770
25771    done
25772  fi
25773
25774  fi
25775
25776
25777    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25778    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25779      # Do we have a bin/java?
25780      if test ! -x "$BOOT_JDK/bin/java"; then
25781        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25782$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25783        BOOT_JDK_FOUND=no
25784      else
25785        # Do we have a bin/javac?
25786        if test ! -x "$BOOT_JDK/bin/javac"; then
25787          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25789          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25790$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25791          BOOT_JDK_FOUND=no
25792        else
25793          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25794          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25795
25796          # Extra M4 quote needed to protect [] in grep expression.
25797          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25798          if test "x$FOUND_CORRECT_VERSION" = x; then
25799            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25800$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25801            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25802$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25803            BOOT_JDK_FOUND=no
25804          else
25805            # We're done! :-)
25806            BOOT_JDK_FOUND=yes
25807
25808  # Only process if variable expands to non-empty
25809
25810  if test "x$BOOT_JDK" != x; then
25811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25812
25813  # Input might be given as Windows format, start by converting to
25814  # unix format.
25815  path="$BOOT_JDK"
25816  new_path=`$CYGPATH -u "$path"`
25817
25818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25821  # "foo.exe" is OK but "foo" is an error.
25822  #
25823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25824  # It is also a way to make sure we got the proper file name for the real test later on.
25825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25826  if test "x$test_shortpath" = x; then
25827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25830  fi
25831
25832  # Call helper function which possibly converts this using DOS-style short mode.
25833  # If so, the updated path is stored in $new_path.
25834
25835  input_path="$new_path"
25836  # Check if we need to convert this using DOS-style short mode. If the path
25837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25838  # take no chances and rewrite it.
25839  # Note: m4 eats our [], so we need to use [ and ] instead.
25840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25841  if test "x$has_forbidden_chars" != x; then
25842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25846      # Going to short mode and back again did indeed matter. Since short mode is
25847      # case insensitive, let's make it lowercase to improve readability.
25848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25849      # Now convert it back to Unix-style (cygpath)
25850      input_path=`$CYGPATH -u "$shortmode_path"`
25851      new_path="$input_path"
25852    fi
25853  fi
25854
25855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25856  if test "x$test_cygdrive_prefix" = x; then
25857    # As a simple fix, exclude /usr/bin since it's not a real path.
25858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25860      # a path prefixed by /cygdrive for fixpath to work.
25861      new_path="$CYGWIN_ROOT_PATH$input_path"
25862    fi
25863  fi
25864
25865
25866  if test "x$path" != "x$new_path"; then
25867    BOOT_JDK="$new_path"
25868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25870  fi
25871
25872    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25873
25874  path="$BOOT_JDK"
25875  has_colon=`$ECHO $path | $GREP ^.:`
25876  new_path="$path"
25877  if test "x$has_colon" = x; then
25878    # Not in mixed or Windows style, start by that.
25879    new_path=`cmd //c echo $path`
25880  fi
25881
25882
25883  input_path="$new_path"
25884  # Check if we need to convert this using DOS-style short mode. If the path
25885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25886  # take no chances and rewrite it.
25887  # Note: m4 eats our [], so we need to use [ and ] instead.
25888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25889  if test "x$has_forbidden_chars" != x; then
25890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25892  fi
25893
25894
25895  windows_path="$new_path"
25896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25897    unix_path=`$CYGPATH -u "$windows_path"`
25898    new_path="$unix_path"
25899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25901    new_path="$unix_path"
25902  fi
25903
25904  if test "x$path" != "x$new_path"; then
25905    BOOT_JDK="$new_path"
25906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25908  fi
25909
25910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25912
25913    else
25914      # We're on a unix platform. Hooray! :)
25915      path="$BOOT_JDK"
25916      has_space=`$ECHO "$path" | $GREP " "`
25917      if test "x$has_space" != x; then
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25920        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25921      fi
25922
25923      # Use eval to expand a potential ~
25924      eval path="$path"
25925      if test ! -f "$path" && test ! -d "$path"; then
25926        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25927      fi
25928
25929      if test -d "$path"; then
25930        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25931      else
25932        dir="`$DIRNAME "$path"`"
25933        base="`$BASENAME "$path"`"
25934        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25935      fi
25936    fi
25937  fi
25938
25939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25940$as_echo_n "checking for Boot JDK... " >&6; }
25941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25942$as_echo "$BOOT_JDK" >&6; }
25943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25944$as_echo_n "checking Boot JDK version... " >&6; }
25945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25947$as_echo "$BOOT_JDK_VERSION" >&6; }
25948          fi # end check jdk version
25949        fi # end check javac
25950      fi # end check java
25951    fi # end check boot jdk found
25952  fi
25953
25954
25955  if test "x$BOOT_JDK_FOUND" = xno; then
25956    # Now execute the test
25957
25958  if test "x$PROGRAMW6432" != x; then
25959    VIRTUAL_DIR="$PROGRAMW6432/Java"
25960
25961  windows_path="$VIRTUAL_DIR"
25962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25963    unix_path=`$CYGPATH -u "$windows_path"`
25964    VIRTUAL_DIR="$unix_path"
25965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25967    VIRTUAL_DIR="$unix_path"
25968  fi
25969
25970
25971  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25972  BOOT_JDK_SUFFIX=""
25973  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25974  if test "x$ALL_JDKS_FOUND" != x; then
25975    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25976
25977  if test "x$BOOT_JDK_FOUND" = xno; then
25978    # Now execute the test
25979
25980        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25981        if test -d "$BOOT_JDK"; then
25982          BOOT_JDK_FOUND=maybe
25983          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25984$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25985        fi
25986
25987
25988    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25989    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25990      # Do we have a bin/java?
25991      if test ! -x "$BOOT_JDK/bin/java"; then
25992        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25994        BOOT_JDK_FOUND=no
25995      else
25996        # Do we have a bin/javac?
25997        if test ! -x "$BOOT_JDK/bin/javac"; then
25998          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26000          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26001$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26002          BOOT_JDK_FOUND=no
26003        else
26004          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26005          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26006
26007          # Extra M4 quote needed to protect [] in grep expression.
26008          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26009          if test "x$FOUND_CORRECT_VERSION" = x; then
26010            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26012            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26013$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26014            BOOT_JDK_FOUND=no
26015          else
26016            # We're done! :-)
26017            BOOT_JDK_FOUND=yes
26018
26019  # Only process if variable expands to non-empty
26020
26021  if test "x$BOOT_JDK" != x; then
26022    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26023
26024  # Input might be given as Windows format, start by converting to
26025  # unix format.
26026  path="$BOOT_JDK"
26027  new_path=`$CYGPATH -u "$path"`
26028
26029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26032  # "foo.exe" is OK but "foo" is an error.
26033  #
26034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26035  # It is also a way to make sure we got the proper file name for the real test later on.
26036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26037  if test "x$test_shortpath" = x; then
26038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26041  fi
26042
26043  # Call helper function which possibly converts this using DOS-style short mode.
26044  # If so, the updated path is stored in $new_path.
26045
26046  input_path="$new_path"
26047  # Check if we need to convert this using DOS-style short mode. If the path
26048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26049  # take no chances and rewrite it.
26050  # Note: m4 eats our [], so we need to use [ and ] instead.
26051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26052  if test "x$has_forbidden_chars" != x; then
26053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26057      # Going to short mode and back again did indeed matter. Since short mode is
26058      # case insensitive, let's make it lowercase to improve readability.
26059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26060      # Now convert it back to Unix-style (cygpath)
26061      input_path=`$CYGPATH -u "$shortmode_path"`
26062      new_path="$input_path"
26063    fi
26064  fi
26065
26066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26067  if test "x$test_cygdrive_prefix" = x; then
26068    # As a simple fix, exclude /usr/bin since it's not a real path.
26069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26071      # a path prefixed by /cygdrive for fixpath to work.
26072      new_path="$CYGWIN_ROOT_PATH$input_path"
26073    fi
26074  fi
26075
26076
26077  if test "x$path" != "x$new_path"; then
26078    BOOT_JDK="$new_path"
26079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26081  fi
26082
26083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26084
26085  path="$BOOT_JDK"
26086  has_colon=`$ECHO $path | $GREP ^.:`
26087  new_path="$path"
26088  if test "x$has_colon" = x; then
26089    # Not in mixed or Windows style, start by that.
26090    new_path=`cmd //c echo $path`
26091  fi
26092
26093
26094  input_path="$new_path"
26095  # Check if we need to convert this using DOS-style short mode. If the path
26096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26097  # take no chances and rewrite it.
26098  # Note: m4 eats our [], so we need to use [ and ] instead.
26099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26100  if test "x$has_forbidden_chars" != x; then
26101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26103  fi
26104
26105
26106  windows_path="$new_path"
26107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26108    unix_path=`$CYGPATH -u "$windows_path"`
26109    new_path="$unix_path"
26110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26112    new_path="$unix_path"
26113  fi
26114
26115  if test "x$path" != "x$new_path"; then
26116    BOOT_JDK="$new_path"
26117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26119  fi
26120
26121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26123
26124    else
26125      # We're on a unix platform. Hooray! :)
26126      path="$BOOT_JDK"
26127      has_space=`$ECHO "$path" | $GREP " "`
26128      if test "x$has_space" != x; then
26129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26131        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26132      fi
26133
26134      # Use eval to expand a potential ~
26135      eval path="$path"
26136      if test ! -f "$path" && test ! -d "$path"; then
26137        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26138      fi
26139
26140      if test -d "$path"; then
26141        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26142      else
26143        dir="`$DIRNAME "$path"`"
26144        base="`$BASENAME "$path"`"
26145        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26146      fi
26147    fi
26148  fi
26149
26150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26151$as_echo_n "checking for Boot JDK... " >&6; }
26152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26153$as_echo "$BOOT_JDK" >&6; }
26154            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26155$as_echo_n "checking Boot JDK version... " >&6; }
26156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26158$as_echo "$BOOT_JDK_VERSION" >&6; }
26159          fi # end check jdk version
26160        fi # end check javac
26161      fi # end check java
26162    fi # end check boot jdk found
26163  fi
26164
26165    done
26166  fi
26167
26168  fi
26169
26170
26171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26173      # Do we have a bin/java?
26174      if test ! -x "$BOOT_JDK/bin/java"; then
26175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26177        BOOT_JDK_FOUND=no
26178      else
26179        # Do we have a bin/javac?
26180        if test ! -x "$BOOT_JDK/bin/javac"; then
26181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26185          BOOT_JDK_FOUND=no
26186        else
26187          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26188          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26189
26190          # Extra M4 quote needed to protect [] in grep expression.
26191          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26192          if test "x$FOUND_CORRECT_VERSION" = x; then
26193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26195            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26196$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26197            BOOT_JDK_FOUND=no
26198          else
26199            # We're done! :-)
26200            BOOT_JDK_FOUND=yes
26201
26202  # Only process if variable expands to non-empty
26203
26204  if test "x$BOOT_JDK" != x; then
26205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26206
26207  # Input might be given as Windows format, start by converting to
26208  # unix format.
26209  path="$BOOT_JDK"
26210  new_path=`$CYGPATH -u "$path"`
26211
26212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26215  # "foo.exe" is OK but "foo" is an error.
26216  #
26217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26218  # It is also a way to make sure we got the proper file name for the real test later on.
26219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26220  if test "x$test_shortpath" = x; then
26221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26223    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26224  fi
26225
26226  # Call helper function which possibly converts this using DOS-style short mode.
26227  # If so, the updated path is stored in $new_path.
26228
26229  input_path="$new_path"
26230  # Check if we need to convert this using DOS-style short mode. If the path
26231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26232  # take no chances and rewrite it.
26233  # Note: m4 eats our [], so we need to use [ and ] instead.
26234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26235  if test "x$has_forbidden_chars" != x; then
26236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26240      # Going to short mode and back again did indeed matter. Since short mode is
26241      # case insensitive, let's make it lowercase to improve readability.
26242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26243      # Now convert it back to Unix-style (cygpath)
26244      input_path=`$CYGPATH -u "$shortmode_path"`
26245      new_path="$input_path"
26246    fi
26247  fi
26248
26249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26250  if test "x$test_cygdrive_prefix" = x; then
26251    # As a simple fix, exclude /usr/bin since it's not a real path.
26252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26254      # a path prefixed by /cygdrive for fixpath to work.
26255      new_path="$CYGWIN_ROOT_PATH$input_path"
26256    fi
26257  fi
26258
26259
26260  if test "x$path" != "x$new_path"; then
26261    BOOT_JDK="$new_path"
26262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26264  fi
26265
26266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26267
26268  path="$BOOT_JDK"
26269  has_colon=`$ECHO $path | $GREP ^.:`
26270  new_path="$path"
26271  if test "x$has_colon" = x; then
26272    # Not in mixed or Windows style, start by that.
26273    new_path=`cmd //c echo $path`
26274  fi
26275
26276
26277  input_path="$new_path"
26278  # Check if we need to convert this using DOS-style short mode. If the path
26279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26280  # take no chances and rewrite it.
26281  # Note: m4 eats our [], so we need to use [ and ] instead.
26282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26283  if test "x$has_forbidden_chars" != x; then
26284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26286  fi
26287
26288
26289  windows_path="$new_path"
26290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26291    unix_path=`$CYGPATH -u "$windows_path"`
26292    new_path="$unix_path"
26293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26295    new_path="$unix_path"
26296  fi
26297
26298  if test "x$path" != "x$new_path"; then
26299    BOOT_JDK="$new_path"
26300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26302  fi
26303
26304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26306
26307    else
26308      # We're on a unix platform. Hooray! :)
26309      path="$BOOT_JDK"
26310      has_space=`$ECHO "$path" | $GREP " "`
26311      if test "x$has_space" != x; then
26312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26315      fi
26316
26317      # Use eval to expand a potential ~
26318      eval path="$path"
26319      if test ! -f "$path" && test ! -d "$path"; then
26320        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26321      fi
26322
26323      if test -d "$path"; then
26324        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26325      else
26326        dir="`$DIRNAME "$path"`"
26327        base="`$BASENAME "$path"`"
26328        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26329      fi
26330    fi
26331  fi
26332
26333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26334$as_echo_n "checking for Boot JDK... " >&6; }
26335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26336$as_echo "$BOOT_JDK" >&6; }
26337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26338$as_echo_n "checking Boot JDK version... " >&6; }
26339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26341$as_echo "$BOOT_JDK_VERSION" >&6; }
26342          fi # end check jdk version
26343        fi # end check javac
26344      fi # end check java
26345    fi # end check boot jdk found
26346  fi
26347
26348
26349  if test "x$BOOT_JDK_FOUND" = xno; then
26350    # Now execute the test
26351
26352  if test "x$PROGRAMFILES" != x; then
26353    VIRTUAL_DIR="$PROGRAMFILES/Java"
26354
26355  windows_path="$VIRTUAL_DIR"
26356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26357    unix_path=`$CYGPATH -u "$windows_path"`
26358    VIRTUAL_DIR="$unix_path"
26359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26361    VIRTUAL_DIR="$unix_path"
26362  fi
26363
26364
26365  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26366  BOOT_JDK_SUFFIX=""
26367  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26368  if test "x$ALL_JDKS_FOUND" != x; then
26369    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26370
26371  if test "x$BOOT_JDK_FOUND" = xno; then
26372    # Now execute the test
26373
26374        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26375        if test -d "$BOOT_JDK"; then
26376          BOOT_JDK_FOUND=maybe
26377          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26378$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26379        fi
26380
26381
26382    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26383    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26384      # Do we have a bin/java?
26385      if test ! -x "$BOOT_JDK/bin/java"; then
26386        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26388        BOOT_JDK_FOUND=no
26389      else
26390        # Do we have a bin/javac?
26391        if test ! -x "$BOOT_JDK/bin/javac"; then
26392          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26393$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26394          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26395$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26396          BOOT_JDK_FOUND=no
26397        else
26398          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26399          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26400
26401          # Extra M4 quote needed to protect [] in grep expression.
26402          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26403          if test "x$FOUND_CORRECT_VERSION" = x; then
26404            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26406            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26407$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26408            BOOT_JDK_FOUND=no
26409          else
26410            # We're done! :-)
26411            BOOT_JDK_FOUND=yes
26412
26413  # Only process if variable expands to non-empty
26414
26415  if test "x$BOOT_JDK" != x; then
26416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26417
26418  # Input might be given as Windows format, start by converting to
26419  # unix format.
26420  path="$BOOT_JDK"
26421  new_path=`$CYGPATH -u "$path"`
26422
26423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26426  # "foo.exe" is OK but "foo" is an error.
26427  #
26428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26429  # It is also a way to make sure we got the proper file name for the real test later on.
26430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26431  if test "x$test_shortpath" = x; then
26432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26433$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26434    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26435  fi
26436
26437  # Call helper function which possibly converts this using DOS-style short mode.
26438  # If so, the updated path is stored in $new_path.
26439
26440  input_path="$new_path"
26441  # Check if we need to convert this using DOS-style short mode. If the path
26442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26443  # take no chances and rewrite it.
26444  # Note: m4 eats our [], so we need to use [ and ] instead.
26445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26446  if test "x$has_forbidden_chars" != x; then
26447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26451      # Going to short mode and back again did indeed matter. Since short mode is
26452      # case insensitive, let's make it lowercase to improve readability.
26453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26454      # Now convert it back to Unix-style (cygpath)
26455      input_path=`$CYGPATH -u "$shortmode_path"`
26456      new_path="$input_path"
26457    fi
26458  fi
26459
26460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26461  if test "x$test_cygdrive_prefix" = x; then
26462    # As a simple fix, exclude /usr/bin since it's not a real path.
26463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26465      # a path prefixed by /cygdrive for fixpath to work.
26466      new_path="$CYGWIN_ROOT_PATH$input_path"
26467    fi
26468  fi
26469
26470
26471  if test "x$path" != "x$new_path"; then
26472    BOOT_JDK="$new_path"
26473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26474$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26475  fi
26476
26477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26478
26479  path="$BOOT_JDK"
26480  has_colon=`$ECHO $path | $GREP ^.:`
26481  new_path="$path"
26482  if test "x$has_colon" = x; then
26483    # Not in mixed or Windows style, start by that.
26484    new_path=`cmd //c echo $path`
26485  fi
26486
26487
26488  input_path="$new_path"
26489  # Check if we need to convert this using DOS-style short mode. If the path
26490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26491  # take no chances and rewrite it.
26492  # Note: m4 eats our [], so we need to use [ and ] instead.
26493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26494  if test "x$has_forbidden_chars" != x; then
26495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26497  fi
26498
26499
26500  windows_path="$new_path"
26501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26502    unix_path=`$CYGPATH -u "$windows_path"`
26503    new_path="$unix_path"
26504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26506    new_path="$unix_path"
26507  fi
26508
26509  if test "x$path" != "x$new_path"; then
26510    BOOT_JDK="$new_path"
26511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26512$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26513  fi
26514
26515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26517
26518    else
26519      # We're on a unix platform. Hooray! :)
26520      path="$BOOT_JDK"
26521      has_space=`$ECHO "$path" | $GREP " "`
26522      if test "x$has_space" != x; then
26523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26524$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26526      fi
26527
26528      # Use eval to expand a potential ~
26529      eval path="$path"
26530      if test ! -f "$path" && test ! -d "$path"; then
26531        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26532      fi
26533
26534      if test -d "$path"; then
26535        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26536      else
26537        dir="`$DIRNAME "$path"`"
26538        base="`$BASENAME "$path"`"
26539        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26540      fi
26541    fi
26542  fi
26543
26544            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26545$as_echo_n "checking for Boot JDK... " >&6; }
26546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26547$as_echo "$BOOT_JDK" >&6; }
26548            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26549$as_echo_n "checking Boot JDK version... " >&6; }
26550            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26551            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26552$as_echo "$BOOT_JDK_VERSION" >&6; }
26553          fi # end check jdk version
26554        fi # end check javac
26555      fi # end check java
26556    fi # end check boot jdk found
26557  fi
26558
26559    done
26560  fi
26561
26562  fi
26563
26564
26565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26567      # Do we have a bin/java?
26568      if test ! -x "$BOOT_JDK/bin/java"; then
26569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26571        BOOT_JDK_FOUND=no
26572      else
26573        # Do we have a bin/javac?
26574        if test ! -x "$BOOT_JDK/bin/javac"; then
26575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26579          BOOT_JDK_FOUND=no
26580        else
26581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26583
26584          # Extra M4 quote needed to protect [] in grep expression.
26585          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26586          if test "x$FOUND_CORRECT_VERSION" = x; then
26587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26591            BOOT_JDK_FOUND=no
26592          else
26593            # We're done! :-)
26594            BOOT_JDK_FOUND=yes
26595
26596  # Only process if variable expands to non-empty
26597
26598  if test "x$BOOT_JDK" != x; then
26599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26600
26601  # Input might be given as Windows format, start by converting to
26602  # unix format.
26603  path="$BOOT_JDK"
26604  new_path=`$CYGPATH -u "$path"`
26605
26606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26609  # "foo.exe" is OK but "foo" is an error.
26610  #
26611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26612  # It is also a way to make sure we got the proper file name for the real test later on.
26613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26614  if test "x$test_shortpath" = x; then
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26616$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26617    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26618  fi
26619
26620  # Call helper function which possibly converts this using DOS-style short mode.
26621  # If so, the updated path is stored in $new_path.
26622
26623  input_path="$new_path"
26624  # Check if we need to convert this using DOS-style short mode. If the path
26625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26626  # take no chances and rewrite it.
26627  # Note: m4 eats our [], so we need to use [ and ] instead.
26628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26629  if test "x$has_forbidden_chars" != x; then
26630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26634      # Going to short mode and back again did indeed matter. Since short mode is
26635      # case insensitive, let's make it lowercase to improve readability.
26636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26637      # Now convert it back to Unix-style (cygpath)
26638      input_path=`$CYGPATH -u "$shortmode_path"`
26639      new_path="$input_path"
26640    fi
26641  fi
26642
26643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26644  if test "x$test_cygdrive_prefix" = x; then
26645    # As a simple fix, exclude /usr/bin since it's not a real path.
26646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26648      # a path prefixed by /cygdrive for fixpath to work.
26649      new_path="$CYGWIN_ROOT_PATH$input_path"
26650    fi
26651  fi
26652
26653
26654  if test "x$path" != "x$new_path"; then
26655    BOOT_JDK="$new_path"
26656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26658  fi
26659
26660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26661
26662  path="$BOOT_JDK"
26663  has_colon=`$ECHO $path | $GREP ^.:`
26664  new_path="$path"
26665  if test "x$has_colon" = x; then
26666    # Not in mixed or Windows style, start by that.
26667    new_path=`cmd //c echo $path`
26668  fi
26669
26670
26671  input_path="$new_path"
26672  # Check if we need to convert this using DOS-style short mode. If the path
26673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26674  # take no chances and rewrite it.
26675  # Note: m4 eats our [], so we need to use [ and ] instead.
26676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26677  if test "x$has_forbidden_chars" != x; then
26678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26680  fi
26681
26682
26683  windows_path="$new_path"
26684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26685    unix_path=`$CYGPATH -u "$windows_path"`
26686    new_path="$unix_path"
26687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26689    new_path="$unix_path"
26690  fi
26691
26692  if test "x$path" != "x$new_path"; then
26693    BOOT_JDK="$new_path"
26694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26696  fi
26697
26698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26700
26701    else
26702      # We're on a unix platform. Hooray! :)
26703      path="$BOOT_JDK"
26704      has_space=`$ECHO "$path" | $GREP " "`
26705      if test "x$has_space" != x; then
26706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26709      fi
26710
26711      # Use eval to expand a potential ~
26712      eval path="$path"
26713      if test ! -f "$path" && test ! -d "$path"; then
26714        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26715      fi
26716
26717      if test -d "$path"; then
26718        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26719      else
26720        dir="`$DIRNAME "$path"`"
26721        base="`$BASENAME "$path"`"
26722        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26723      fi
26724    fi
26725  fi
26726
26727            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26728$as_echo_n "checking for Boot JDK... " >&6; }
26729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26730$as_echo "$BOOT_JDK" >&6; }
26731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26732$as_echo_n "checking Boot JDK version... " >&6; }
26733            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26735$as_echo "$BOOT_JDK_VERSION" >&6; }
26736          fi # end check jdk version
26737        fi # end check javac
26738      fi # end check java
26739    fi # end check boot jdk found
26740  fi
26741
26742
26743  if test "x$BOOT_JDK_FOUND" = xno; then
26744    # Now execute the test
26745
26746  if test "x$ProgramFiles" != x; then
26747    VIRTUAL_DIR="$ProgramFiles/Java"
26748
26749  windows_path="$VIRTUAL_DIR"
26750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26751    unix_path=`$CYGPATH -u "$windows_path"`
26752    VIRTUAL_DIR="$unix_path"
26753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26755    VIRTUAL_DIR="$unix_path"
26756  fi
26757
26758
26759  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26760  BOOT_JDK_SUFFIX=""
26761  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26762  if test "x$ALL_JDKS_FOUND" != x; then
26763    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26764
26765  if test "x$BOOT_JDK_FOUND" = xno; then
26766    # Now execute the test
26767
26768        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26769        if test -d "$BOOT_JDK"; then
26770          BOOT_JDK_FOUND=maybe
26771          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26772$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26773        fi
26774
26775
26776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26778      # Do we have a bin/java?
26779      if test ! -x "$BOOT_JDK/bin/java"; then
26780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26782        BOOT_JDK_FOUND=no
26783      else
26784        # Do we have a bin/javac?
26785        if test ! -x "$BOOT_JDK/bin/javac"; then
26786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26790          BOOT_JDK_FOUND=no
26791        else
26792          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26793          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26794
26795          # Extra M4 quote needed to protect [] in grep expression.
26796          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26797          if test "x$FOUND_CORRECT_VERSION" = x; then
26798            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26800            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26801$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26802            BOOT_JDK_FOUND=no
26803          else
26804            # We're done! :-)
26805            BOOT_JDK_FOUND=yes
26806
26807  # Only process if variable expands to non-empty
26808
26809  if test "x$BOOT_JDK" != x; then
26810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811
26812  # Input might be given as Windows format, start by converting to
26813  # unix format.
26814  path="$BOOT_JDK"
26815  new_path=`$CYGPATH -u "$path"`
26816
26817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26820  # "foo.exe" is OK but "foo" is an error.
26821  #
26822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26823  # It is also a way to make sure we got the proper file name for the real test later on.
26824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26825  if test "x$test_shortpath" = x; then
26826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26827$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26828    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26829  fi
26830
26831  # Call helper function which possibly converts this using DOS-style short mode.
26832  # If so, the updated path is stored in $new_path.
26833
26834  input_path="$new_path"
26835  # Check if we need to convert this using DOS-style short mode. If the path
26836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26837  # take no chances and rewrite it.
26838  # Note: m4 eats our [], so we need to use [ and ] instead.
26839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26840  if test "x$has_forbidden_chars" != x; then
26841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26845      # Going to short mode and back again did indeed matter. Since short mode is
26846      # case insensitive, let's make it lowercase to improve readability.
26847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26848      # Now convert it back to Unix-style (cygpath)
26849      input_path=`$CYGPATH -u "$shortmode_path"`
26850      new_path="$input_path"
26851    fi
26852  fi
26853
26854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26855  if test "x$test_cygdrive_prefix" = x; then
26856    # As a simple fix, exclude /usr/bin since it's not a real path.
26857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26859      # a path prefixed by /cygdrive for fixpath to work.
26860      new_path="$CYGWIN_ROOT_PATH$input_path"
26861    fi
26862  fi
26863
26864
26865  if test "x$path" != "x$new_path"; then
26866    BOOT_JDK="$new_path"
26867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26868$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26869  fi
26870
26871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26872
26873  path="$BOOT_JDK"
26874  has_colon=`$ECHO $path | $GREP ^.:`
26875  new_path="$path"
26876  if test "x$has_colon" = x; then
26877    # Not in mixed or Windows style, start by that.
26878    new_path=`cmd //c echo $path`
26879  fi
26880
26881
26882  input_path="$new_path"
26883  # Check if we need to convert this using DOS-style short mode. If the path
26884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26885  # take no chances and rewrite it.
26886  # Note: m4 eats our [], so we need to use [ and ] instead.
26887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26888  if test "x$has_forbidden_chars" != x; then
26889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26891  fi
26892
26893
26894  windows_path="$new_path"
26895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26896    unix_path=`$CYGPATH -u "$windows_path"`
26897    new_path="$unix_path"
26898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26900    new_path="$unix_path"
26901  fi
26902
26903  if test "x$path" != "x$new_path"; then
26904    BOOT_JDK="$new_path"
26905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26906$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26907  fi
26908
26909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26911
26912    else
26913      # We're on a unix platform. Hooray! :)
26914      path="$BOOT_JDK"
26915      has_space=`$ECHO "$path" | $GREP " "`
26916      if test "x$has_space" != x; then
26917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26920      fi
26921
26922      # Use eval to expand a potential ~
26923      eval path="$path"
26924      if test ! -f "$path" && test ! -d "$path"; then
26925        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26926      fi
26927
26928      if test -d "$path"; then
26929        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26930      else
26931        dir="`$DIRNAME "$path"`"
26932        base="`$BASENAME "$path"`"
26933        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26934      fi
26935    fi
26936  fi
26937
26938            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26939$as_echo_n "checking for Boot JDK... " >&6; }
26940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26941$as_echo "$BOOT_JDK" >&6; }
26942            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26943$as_echo_n "checking Boot JDK version... " >&6; }
26944            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26946$as_echo "$BOOT_JDK_VERSION" >&6; }
26947          fi # end check jdk version
26948        fi # end check javac
26949      fi # end check java
26950    fi # end check boot jdk found
26951  fi
26952
26953    done
26954  fi
26955
26956  fi
26957
26958
26959    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26960    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26961      # Do we have a bin/java?
26962      if test ! -x "$BOOT_JDK/bin/java"; then
26963        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26965        BOOT_JDK_FOUND=no
26966      else
26967        # Do we have a bin/javac?
26968        if test ! -x "$BOOT_JDK/bin/javac"; then
26969          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26971          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26972$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26973          BOOT_JDK_FOUND=no
26974        else
26975          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26976          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26977
26978          # Extra M4 quote needed to protect [] in grep expression.
26979          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26980          if test "x$FOUND_CORRECT_VERSION" = x; then
26981            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26982$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26983            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26984$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26985            BOOT_JDK_FOUND=no
26986          else
26987            # We're done! :-)
26988            BOOT_JDK_FOUND=yes
26989
26990  # Only process if variable expands to non-empty
26991
26992  if test "x$BOOT_JDK" != x; then
26993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26994
26995  # Input might be given as Windows format, start by converting to
26996  # unix format.
26997  path="$BOOT_JDK"
26998  new_path=`$CYGPATH -u "$path"`
26999
27000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27003  # "foo.exe" is OK but "foo" is an error.
27004  #
27005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27006  # It is also a way to make sure we got the proper file name for the real test later on.
27007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27008  if test "x$test_shortpath" = x; then
27009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27012  fi
27013
27014  # Call helper function which possibly converts this using DOS-style short mode.
27015  # If so, the updated path is stored in $new_path.
27016
27017  input_path="$new_path"
27018  # Check if we need to convert this using DOS-style short mode. If the path
27019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27020  # take no chances and rewrite it.
27021  # Note: m4 eats our [], so we need to use [ and ] instead.
27022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27023  if test "x$has_forbidden_chars" != x; then
27024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27028      # Going to short mode and back again did indeed matter. Since short mode is
27029      # case insensitive, let's make it lowercase to improve readability.
27030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27031      # Now convert it back to Unix-style (cygpath)
27032      input_path=`$CYGPATH -u "$shortmode_path"`
27033      new_path="$input_path"
27034    fi
27035  fi
27036
27037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27038  if test "x$test_cygdrive_prefix" = x; then
27039    # As a simple fix, exclude /usr/bin since it's not a real path.
27040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27042      # a path prefixed by /cygdrive for fixpath to work.
27043      new_path="$CYGWIN_ROOT_PATH$input_path"
27044    fi
27045  fi
27046
27047
27048  if test "x$path" != "x$new_path"; then
27049    BOOT_JDK="$new_path"
27050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27052  fi
27053
27054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27055
27056  path="$BOOT_JDK"
27057  has_colon=`$ECHO $path | $GREP ^.:`
27058  new_path="$path"
27059  if test "x$has_colon" = x; then
27060    # Not in mixed or Windows style, start by that.
27061    new_path=`cmd //c echo $path`
27062  fi
27063
27064
27065  input_path="$new_path"
27066  # Check if we need to convert this using DOS-style short mode. If the path
27067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27068  # take no chances and rewrite it.
27069  # Note: m4 eats our [], so we need to use [ and ] instead.
27070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27071  if test "x$has_forbidden_chars" != x; then
27072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27074  fi
27075
27076
27077  windows_path="$new_path"
27078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27079    unix_path=`$CYGPATH -u "$windows_path"`
27080    new_path="$unix_path"
27081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27083    new_path="$unix_path"
27084  fi
27085
27086  if test "x$path" != "x$new_path"; then
27087    BOOT_JDK="$new_path"
27088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27090  fi
27091
27092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27094
27095    else
27096      # We're on a unix platform. Hooray! :)
27097      path="$BOOT_JDK"
27098      has_space=`$ECHO "$path" | $GREP " "`
27099      if test "x$has_space" != x; then
27100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27102        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27103      fi
27104
27105      # Use eval to expand a potential ~
27106      eval path="$path"
27107      if test ! -f "$path" && test ! -d "$path"; then
27108        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27109      fi
27110
27111      if test -d "$path"; then
27112        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27113      else
27114        dir="`$DIRNAME "$path"`"
27115        base="`$BASENAME "$path"`"
27116        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27117      fi
27118    fi
27119  fi
27120
27121            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27122$as_echo_n "checking for Boot JDK... " >&6; }
27123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27124$as_echo "$BOOT_JDK" >&6; }
27125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27126$as_echo_n "checking Boot JDK version... " >&6; }
27127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27129$as_echo "$BOOT_JDK_VERSION" >&6; }
27130          fi # end check jdk version
27131        fi # end check javac
27132      fi # end check java
27133    fi # end check boot jdk found
27134  fi
27135
27136
27137  if test "x$BOOT_JDK_FOUND" = xno; then
27138    # Now execute the test
27139
27140  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27141  BOOT_JDK_SUFFIX=""
27142  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27143  if test "x$ALL_JDKS_FOUND" != x; then
27144    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27145
27146  if test "x$BOOT_JDK_FOUND" = xno; then
27147    # Now execute the test
27148
27149        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27150        if test -d "$BOOT_JDK"; then
27151          BOOT_JDK_FOUND=maybe
27152          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27153$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27154        fi
27155
27156
27157    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27158    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27159      # Do we have a bin/java?
27160      if test ! -x "$BOOT_JDK/bin/java"; then
27161        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27163        BOOT_JDK_FOUND=no
27164      else
27165        # Do we have a bin/javac?
27166        if test ! -x "$BOOT_JDK/bin/javac"; then
27167          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27169          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27170$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27171          BOOT_JDK_FOUND=no
27172        else
27173          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27174          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27175
27176          # Extra M4 quote needed to protect [] in grep expression.
27177          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27178          if test "x$FOUND_CORRECT_VERSION" = x; then
27179            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27180$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27181            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27182$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27183            BOOT_JDK_FOUND=no
27184          else
27185            # We're done! :-)
27186            BOOT_JDK_FOUND=yes
27187
27188  # Only process if variable expands to non-empty
27189
27190  if test "x$BOOT_JDK" != x; then
27191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27192
27193  # Input might be given as Windows format, start by converting to
27194  # unix format.
27195  path="$BOOT_JDK"
27196  new_path=`$CYGPATH -u "$path"`
27197
27198  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27199  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27200  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27201  # "foo.exe" is OK but "foo" is an error.
27202  #
27203  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27204  # It is also a way to make sure we got the proper file name for the real test later on.
27205  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27206  if test "x$test_shortpath" = x; then
27207    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27209    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27210  fi
27211
27212  # Call helper function which possibly converts this using DOS-style short mode.
27213  # If so, the updated path is stored in $new_path.
27214
27215  input_path="$new_path"
27216  # Check if we need to convert this using DOS-style short mode. If the path
27217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27218  # take no chances and rewrite it.
27219  # Note: m4 eats our [], so we need to use [ and ] instead.
27220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27221  if test "x$has_forbidden_chars" != x; then
27222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27226      # Going to short mode and back again did indeed matter. Since short mode is
27227      # case insensitive, let's make it lowercase to improve readability.
27228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27229      # Now convert it back to Unix-style (cygpath)
27230      input_path=`$CYGPATH -u "$shortmode_path"`
27231      new_path="$input_path"
27232    fi
27233  fi
27234
27235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27236  if test "x$test_cygdrive_prefix" = x; then
27237    # As a simple fix, exclude /usr/bin since it's not a real path.
27238    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27240      # a path prefixed by /cygdrive for fixpath to work.
27241      new_path="$CYGWIN_ROOT_PATH$input_path"
27242    fi
27243  fi
27244
27245
27246  if test "x$path" != "x$new_path"; then
27247    BOOT_JDK="$new_path"
27248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27249$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27250  fi
27251
27252    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27253
27254  path="$BOOT_JDK"
27255  has_colon=`$ECHO $path | $GREP ^.:`
27256  new_path="$path"
27257  if test "x$has_colon" = x; then
27258    # Not in mixed or Windows style, start by that.
27259    new_path=`cmd //c echo $path`
27260  fi
27261
27262
27263  input_path="$new_path"
27264  # Check if we need to convert this using DOS-style short mode. If the path
27265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27266  # take no chances and rewrite it.
27267  # Note: m4 eats our [], so we need to use [ and ] instead.
27268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27269  if test "x$has_forbidden_chars" != x; then
27270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27272  fi
27273
27274
27275  windows_path="$new_path"
27276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27277    unix_path=`$CYGPATH -u "$windows_path"`
27278    new_path="$unix_path"
27279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27281    new_path="$unix_path"
27282  fi
27283
27284  if test "x$path" != "x$new_path"; then
27285    BOOT_JDK="$new_path"
27286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27288  fi
27289
27290  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27291  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27292
27293    else
27294      # We're on a unix platform. Hooray! :)
27295      path="$BOOT_JDK"
27296      has_space=`$ECHO "$path" | $GREP " "`
27297      if test "x$has_space" != x; then
27298        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27300        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27301      fi
27302
27303      # Use eval to expand a potential ~
27304      eval path="$path"
27305      if test ! -f "$path" && test ! -d "$path"; then
27306        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27307      fi
27308
27309      if test -d "$path"; then
27310        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27311      else
27312        dir="`$DIRNAME "$path"`"
27313        base="`$BASENAME "$path"`"
27314        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27315      fi
27316    fi
27317  fi
27318
27319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27320$as_echo_n "checking for Boot JDK... " >&6; }
27321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27322$as_echo "$BOOT_JDK" >&6; }
27323            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27324$as_echo_n "checking Boot JDK version... " >&6; }
27325            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27327$as_echo "$BOOT_JDK_VERSION" >&6; }
27328          fi # end check jdk version
27329        fi # end check javac
27330      fi # end check java
27331    fi # end check boot jdk found
27332  fi
27333
27334    done
27335  fi
27336
27337
27338    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27339    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27340      # Do we have a bin/java?
27341      if test ! -x "$BOOT_JDK/bin/java"; then
27342        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27344        BOOT_JDK_FOUND=no
27345      else
27346        # Do we have a bin/javac?
27347        if test ! -x "$BOOT_JDK/bin/javac"; then
27348          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27350          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27351$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27352          BOOT_JDK_FOUND=no
27353        else
27354          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27355          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27356
27357          # Extra M4 quote needed to protect [] in grep expression.
27358          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27359          if test "x$FOUND_CORRECT_VERSION" = x; then
27360            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27362            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27363$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27364            BOOT_JDK_FOUND=no
27365          else
27366            # We're done! :-)
27367            BOOT_JDK_FOUND=yes
27368
27369  # Only process if variable expands to non-empty
27370
27371  if test "x$BOOT_JDK" != x; then
27372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27373
27374  # Input might be given as Windows format, start by converting to
27375  # unix format.
27376  path="$BOOT_JDK"
27377  new_path=`$CYGPATH -u "$path"`
27378
27379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27382  # "foo.exe" is OK but "foo" is an error.
27383  #
27384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27385  # It is also a way to make sure we got the proper file name for the real test later on.
27386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27387  if test "x$test_shortpath" = x; then
27388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27390    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27391  fi
27392
27393  # Call helper function which possibly converts this using DOS-style short mode.
27394  # If so, the updated path is stored in $new_path.
27395
27396  input_path="$new_path"
27397  # Check if we need to convert this using DOS-style short mode. If the path
27398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27399  # take no chances and rewrite it.
27400  # Note: m4 eats our [], so we need to use [ and ] instead.
27401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27402  if test "x$has_forbidden_chars" != x; then
27403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27407      # Going to short mode and back again did indeed matter. Since short mode is
27408      # case insensitive, let's make it lowercase to improve readability.
27409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27410      # Now convert it back to Unix-style (cygpath)
27411      input_path=`$CYGPATH -u "$shortmode_path"`
27412      new_path="$input_path"
27413    fi
27414  fi
27415
27416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27417  if test "x$test_cygdrive_prefix" = x; then
27418    # As a simple fix, exclude /usr/bin since it's not a real path.
27419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27421      # a path prefixed by /cygdrive for fixpath to work.
27422      new_path="$CYGWIN_ROOT_PATH$input_path"
27423    fi
27424  fi
27425
27426
27427  if test "x$path" != "x$new_path"; then
27428    BOOT_JDK="$new_path"
27429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27431  fi
27432
27433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27434
27435  path="$BOOT_JDK"
27436  has_colon=`$ECHO $path | $GREP ^.:`
27437  new_path="$path"
27438  if test "x$has_colon" = x; then
27439    # Not in mixed or Windows style, start by that.
27440    new_path=`cmd //c echo $path`
27441  fi
27442
27443
27444  input_path="$new_path"
27445  # Check if we need to convert this using DOS-style short mode. If the path
27446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27447  # take no chances and rewrite it.
27448  # Note: m4 eats our [], so we need to use [ and ] instead.
27449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27450  if test "x$has_forbidden_chars" != x; then
27451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27453  fi
27454
27455
27456  windows_path="$new_path"
27457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27458    unix_path=`$CYGPATH -u "$windows_path"`
27459    new_path="$unix_path"
27460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27462    new_path="$unix_path"
27463  fi
27464
27465  if test "x$path" != "x$new_path"; then
27466    BOOT_JDK="$new_path"
27467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27469  fi
27470
27471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27473
27474    else
27475      # We're on a unix platform. Hooray! :)
27476      path="$BOOT_JDK"
27477      has_space=`$ECHO "$path" | $GREP " "`
27478      if test "x$has_space" != x; then
27479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27482      fi
27483
27484      # Use eval to expand a potential ~
27485      eval path="$path"
27486      if test ! -f "$path" && test ! -d "$path"; then
27487        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27488      fi
27489
27490      if test -d "$path"; then
27491        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27492      else
27493        dir="`$DIRNAME "$path"`"
27494        base="`$BASENAME "$path"`"
27495        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27496      fi
27497    fi
27498  fi
27499
27500            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27501$as_echo_n "checking for Boot JDK... " >&6; }
27502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27503$as_echo "$BOOT_JDK" >&6; }
27504            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27505$as_echo_n "checking Boot JDK version... " >&6; }
27506            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27508$as_echo "$BOOT_JDK_VERSION" >&6; }
27509          fi # end check jdk version
27510        fi # end check javac
27511      fi # end check java
27512    fi # end check boot jdk found
27513  fi
27514
27515  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27516
27517  if test "x$BOOT_JDK_FOUND" = xno; then
27518    # Now execute the test
27519
27520  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27521  BOOT_JDK_SUFFIX="/Contents/Home"
27522  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27523  if test "x$ALL_JDKS_FOUND" != x; then
27524    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27525
27526  if test "x$BOOT_JDK_FOUND" = xno; then
27527    # Now execute the test
27528
27529        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27530        if test -d "$BOOT_JDK"; then
27531          BOOT_JDK_FOUND=maybe
27532          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27533$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27534        fi
27535
27536
27537    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27538    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27539      # Do we have a bin/java?
27540      if test ! -x "$BOOT_JDK/bin/java"; then
27541        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27543        BOOT_JDK_FOUND=no
27544      else
27545        # Do we have a bin/javac?
27546        if test ! -x "$BOOT_JDK/bin/javac"; then
27547          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27549          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27550$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27551          BOOT_JDK_FOUND=no
27552        else
27553          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27554          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27555
27556          # Extra M4 quote needed to protect [] in grep expression.
27557          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27558          if test "x$FOUND_CORRECT_VERSION" = x; then
27559            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27561            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27562$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27563            BOOT_JDK_FOUND=no
27564          else
27565            # We're done! :-)
27566            BOOT_JDK_FOUND=yes
27567
27568  # Only process if variable expands to non-empty
27569
27570  if test "x$BOOT_JDK" != x; then
27571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27572
27573  # Input might be given as Windows format, start by converting to
27574  # unix format.
27575  path="$BOOT_JDK"
27576  new_path=`$CYGPATH -u "$path"`
27577
27578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27581  # "foo.exe" is OK but "foo" is an error.
27582  #
27583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27584  # It is also a way to make sure we got the proper file name for the real test later on.
27585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27586  if test "x$test_shortpath" = x; then
27587    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27589    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27590  fi
27591
27592  # Call helper function which possibly converts this using DOS-style short mode.
27593  # If so, the updated path is stored in $new_path.
27594
27595  input_path="$new_path"
27596  # Check if we need to convert this using DOS-style short mode. If the path
27597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27598  # take no chances and rewrite it.
27599  # Note: m4 eats our [], so we need to use [ and ] instead.
27600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27601  if test "x$has_forbidden_chars" != x; then
27602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27606      # Going to short mode and back again did indeed matter. Since short mode is
27607      # case insensitive, let's make it lowercase to improve readability.
27608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27609      # Now convert it back to Unix-style (cygpath)
27610      input_path=`$CYGPATH -u "$shortmode_path"`
27611      new_path="$input_path"
27612    fi
27613  fi
27614
27615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27616  if test "x$test_cygdrive_prefix" = x; then
27617    # As a simple fix, exclude /usr/bin since it's not a real path.
27618    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27620      # a path prefixed by /cygdrive for fixpath to work.
27621      new_path="$CYGWIN_ROOT_PATH$input_path"
27622    fi
27623  fi
27624
27625
27626  if test "x$path" != "x$new_path"; then
27627    BOOT_JDK="$new_path"
27628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27630  fi
27631
27632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27633
27634  path="$BOOT_JDK"
27635  has_colon=`$ECHO $path | $GREP ^.:`
27636  new_path="$path"
27637  if test "x$has_colon" = x; then
27638    # Not in mixed or Windows style, start by that.
27639    new_path=`cmd //c echo $path`
27640  fi
27641
27642
27643  input_path="$new_path"
27644  # Check if we need to convert this using DOS-style short mode. If the path
27645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27646  # take no chances and rewrite it.
27647  # Note: m4 eats our [], so we need to use [ and ] instead.
27648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27649  if test "x$has_forbidden_chars" != x; then
27650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27652  fi
27653
27654
27655  windows_path="$new_path"
27656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27657    unix_path=`$CYGPATH -u "$windows_path"`
27658    new_path="$unix_path"
27659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27661    new_path="$unix_path"
27662  fi
27663
27664  if test "x$path" != "x$new_path"; then
27665    BOOT_JDK="$new_path"
27666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27668  fi
27669
27670  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27671  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27672
27673    else
27674      # We're on a unix platform. Hooray! :)
27675      path="$BOOT_JDK"
27676      has_space=`$ECHO "$path" | $GREP " "`
27677      if test "x$has_space" != x; then
27678        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27680        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27681      fi
27682
27683      # Use eval to expand a potential ~
27684      eval path="$path"
27685      if test ! -f "$path" && test ! -d "$path"; then
27686        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27687      fi
27688
27689      if test -d "$path"; then
27690        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27691      else
27692        dir="`$DIRNAME "$path"`"
27693        base="`$BASENAME "$path"`"
27694        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27695      fi
27696    fi
27697  fi
27698
27699            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27700$as_echo_n "checking for Boot JDK... " >&6; }
27701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27702$as_echo "$BOOT_JDK" >&6; }
27703            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27704$as_echo_n "checking Boot JDK version... " >&6; }
27705            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27706            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27707$as_echo "$BOOT_JDK_VERSION" >&6; }
27708          fi # end check jdk version
27709        fi # end check javac
27710      fi # end check java
27711    fi # end check boot jdk found
27712  fi
27713
27714    done
27715  fi
27716
27717
27718    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27719    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27720      # Do we have a bin/java?
27721      if test ! -x "$BOOT_JDK/bin/java"; then
27722        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27724        BOOT_JDK_FOUND=no
27725      else
27726        # Do we have a bin/javac?
27727        if test ! -x "$BOOT_JDK/bin/javac"; then
27728          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27730          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27731$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27732          BOOT_JDK_FOUND=no
27733        else
27734          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27735          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27736
27737          # Extra M4 quote needed to protect [] in grep expression.
27738          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27739          if test "x$FOUND_CORRECT_VERSION" = x; then
27740            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27742            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27743$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27744            BOOT_JDK_FOUND=no
27745          else
27746            # We're done! :-)
27747            BOOT_JDK_FOUND=yes
27748
27749  # Only process if variable expands to non-empty
27750
27751  if test "x$BOOT_JDK" != x; then
27752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27753
27754  # Input might be given as Windows format, start by converting to
27755  # unix format.
27756  path="$BOOT_JDK"
27757  new_path=`$CYGPATH -u "$path"`
27758
27759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27762  # "foo.exe" is OK but "foo" is an error.
27763  #
27764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27765  # It is also a way to make sure we got the proper file name for the real test later on.
27766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27767  if test "x$test_shortpath" = x; then
27768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27770    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27771  fi
27772
27773  # Call helper function which possibly converts this using DOS-style short mode.
27774  # If so, the updated path is stored in $new_path.
27775
27776  input_path="$new_path"
27777  # Check if we need to convert this using DOS-style short mode. If the path
27778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27779  # take no chances and rewrite it.
27780  # Note: m4 eats our [], so we need to use [ and ] instead.
27781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27782  if test "x$has_forbidden_chars" != x; then
27783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27787      # Going to short mode and back again did indeed matter. Since short mode is
27788      # case insensitive, let's make it lowercase to improve readability.
27789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27790      # Now convert it back to Unix-style (cygpath)
27791      input_path=`$CYGPATH -u "$shortmode_path"`
27792      new_path="$input_path"
27793    fi
27794  fi
27795
27796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27797  if test "x$test_cygdrive_prefix" = x; then
27798    # As a simple fix, exclude /usr/bin since it's not a real path.
27799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27801      # a path prefixed by /cygdrive for fixpath to work.
27802      new_path="$CYGWIN_ROOT_PATH$input_path"
27803    fi
27804  fi
27805
27806
27807  if test "x$path" != "x$new_path"; then
27808    BOOT_JDK="$new_path"
27809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27811  fi
27812
27813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27814
27815  path="$BOOT_JDK"
27816  has_colon=`$ECHO $path | $GREP ^.:`
27817  new_path="$path"
27818  if test "x$has_colon" = x; then
27819    # Not in mixed or Windows style, start by that.
27820    new_path=`cmd //c echo $path`
27821  fi
27822
27823
27824  input_path="$new_path"
27825  # Check if we need to convert this using DOS-style short mode. If the path
27826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27827  # take no chances and rewrite it.
27828  # Note: m4 eats our [], so we need to use [ and ] instead.
27829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27830  if test "x$has_forbidden_chars" != x; then
27831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27833  fi
27834
27835
27836  windows_path="$new_path"
27837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27838    unix_path=`$CYGPATH -u "$windows_path"`
27839    new_path="$unix_path"
27840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27842    new_path="$unix_path"
27843  fi
27844
27845  if test "x$path" != "x$new_path"; then
27846    BOOT_JDK="$new_path"
27847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27849  fi
27850
27851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27853
27854    else
27855      # We're on a unix platform. Hooray! :)
27856      path="$BOOT_JDK"
27857      has_space=`$ECHO "$path" | $GREP " "`
27858      if test "x$has_space" != x; then
27859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27862      fi
27863
27864      # Use eval to expand a potential ~
27865      eval path="$path"
27866      if test ! -f "$path" && test ! -d "$path"; then
27867        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27868      fi
27869
27870      if test -d "$path"; then
27871        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27872      else
27873        dir="`$DIRNAME "$path"`"
27874        base="`$BASENAME "$path"`"
27875        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27876      fi
27877    fi
27878  fi
27879
27880            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27881$as_echo_n "checking for Boot JDK... " >&6; }
27882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27883$as_echo "$BOOT_JDK" >&6; }
27884            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27885$as_echo_n "checking Boot JDK version... " >&6; }
27886            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27888$as_echo "$BOOT_JDK_VERSION" >&6; }
27889          fi # end check jdk version
27890        fi # end check javac
27891      fi # end check java
27892    fi # end check boot jdk found
27893  fi
27894
27895
27896  if test "x$BOOT_JDK_FOUND" = xno; then
27897    # Now execute the test
27898
27899  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27900  BOOT_JDK_SUFFIX="/Contents/Home"
27901  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27902  if test "x$ALL_JDKS_FOUND" != x; then
27903    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27904
27905  if test "x$BOOT_JDK_FOUND" = xno; then
27906    # Now execute the test
27907
27908        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27909        if test -d "$BOOT_JDK"; then
27910          BOOT_JDK_FOUND=maybe
27911          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27912$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27913        fi
27914
27915
27916    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27917    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27918      # Do we have a bin/java?
27919      if test ! -x "$BOOT_JDK/bin/java"; then
27920        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27922        BOOT_JDK_FOUND=no
27923      else
27924        # Do we have a bin/javac?
27925        if test ! -x "$BOOT_JDK/bin/javac"; then
27926          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27928          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27929$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27930          BOOT_JDK_FOUND=no
27931        else
27932          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27933          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27934
27935          # Extra M4 quote needed to protect [] in grep expression.
27936          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27937          if test "x$FOUND_CORRECT_VERSION" = x; then
27938            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27940            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27941$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27942            BOOT_JDK_FOUND=no
27943          else
27944            # We're done! :-)
27945            BOOT_JDK_FOUND=yes
27946
27947  # Only process if variable expands to non-empty
27948
27949  if test "x$BOOT_JDK" != x; then
27950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27951
27952  # Input might be given as Windows format, start by converting to
27953  # unix format.
27954  path="$BOOT_JDK"
27955  new_path=`$CYGPATH -u "$path"`
27956
27957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27960  # "foo.exe" is OK but "foo" is an error.
27961  #
27962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27963  # It is also a way to make sure we got the proper file name for the real test later on.
27964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27965  if test "x$test_shortpath" = x; then
27966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27967$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27968    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27969  fi
27970
27971  # Call helper function which possibly converts this using DOS-style short mode.
27972  # If so, the updated path is stored in $new_path.
27973
27974  input_path="$new_path"
27975  # Check if we need to convert this using DOS-style short mode. If the path
27976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27977  # take no chances and rewrite it.
27978  # Note: m4 eats our [], so we need to use [ and ] instead.
27979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27980  if test "x$has_forbidden_chars" != x; then
27981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27985      # Going to short mode and back again did indeed matter. Since short mode is
27986      # case insensitive, let's make it lowercase to improve readability.
27987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27988      # Now convert it back to Unix-style (cygpath)
27989      input_path=`$CYGPATH -u "$shortmode_path"`
27990      new_path="$input_path"
27991    fi
27992  fi
27993
27994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27995  if test "x$test_cygdrive_prefix" = x; then
27996    # As a simple fix, exclude /usr/bin since it's not a real path.
27997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27999      # a path prefixed by /cygdrive for fixpath to work.
28000      new_path="$CYGWIN_ROOT_PATH$input_path"
28001    fi
28002  fi
28003
28004
28005  if test "x$path" != "x$new_path"; then
28006    BOOT_JDK="$new_path"
28007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28008$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28009  fi
28010
28011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28012
28013  path="$BOOT_JDK"
28014  has_colon=`$ECHO $path | $GREP ^.:`
28015  new_path="$path"
28016  if test "x$has_colon" = x; then
28017    # Not in mixed or Windows style, start by that.
28018    new_path=`cmd //c echo $path`
28019  fi
28020
28021
28022  input_path="$new_path"
28023  # Check if we need to convert this using DOS-style short mode. If the path
28024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28025  # take no chances and rewrite it.
28026  # Note: m4 eats our [], so we need to use [ and ] instead.
28027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28028  if test "x$has_forbidden_chars" != x; then
28029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28031  fi
28032
28033
28034  windows_path="$new_path"
28035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28036    unix_path=`$CYGPATH -u "$windows_path"`
28037    new_path="$unix_path"
28038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28040    new_path="$unix_path"
28041  fi
28042
28043  if test "x$path" != "x$new_path"; then
28044    BOOT_JDK="$new_path"
28045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28046$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28047  fi
28048
28049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28051
28052    else
28053      # We're on a unix platform. Hooray! :)
28054      path="$BOOT_JDK"
28055      has_space=`$ECHO "$path" | $GREP " "`
28056      if test "x$has_space" != x; then
28057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28059        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28060      fi
28061
28062      # Use eval to expand a potential ~
28063      eval path="$path"
28064      if test ! -f "$path" && test ! -d "$path"; then
28065        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28066      fi
28067
28068      if test -d "$path"; then
28069        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28070      else
28071        dir="`$DIRNAME "$path"`"
28072        base="`$BASENAME "$path"`"
28073        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28074      fi
28075    fi
28076  fi
28077
28078            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28079$as_echo_n "checking for Boot JDK... " >&6; }
28080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28081$as_echo "$BOOT_JDK" >&6; }
28082            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28083$as_echo_n "checking Boot JDK version... " >&6; }
28084            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28085            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28086$as_echo "$BOOT_JDK_VERSION" >&6; }
28087          fi # end check jdk version
28088        fi # end check javac
28089      fi # end check java
28090    fi # end check boot jdk found
28091  fi
28092
28093    done
28094  fi
28095
28096
28097    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28098    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28099      # Do we have a bin/java?
28100      if test ! -x "$BOOT_JDK/bin/java"; then
28101        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28103        BOOT_JDK_FOUND=no
28104      else
28105        # Do we have a bin/javac?
28106        if test ! -x "$BOOT_JDK/bin/javac"; then
28107          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28109          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28110$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28111          BOOT_JDK_FOUND=no
28112        else
28113          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28114          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28115
28116          # Extra M4 quote needed to protect [] in grep expression.
28117          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28118          if test "x$FOUND_CORRECT_VERSION" = x; then
28119            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28121            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28122$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28123            BOOT_JDK_FOUND=no
28124          else
28125            # We're done! :-)
28126            BOOT_JDK_FOUND=yes
28127
28128  # Only process if variable expands to non-empty
28129
28130  if test "x$BOOT_JDK" != x; then
28131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132
28133  # Input might be given as Windows format, start by converting to
28134  # unix format.
28135  path="$BOOT_JDK"
28136  new_path=`$CYGPATH -u "$path"`
28137
28138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28141  # "foo.exe" is OK but "foo" is an error.
28142  #
28143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28144  # It is also a way to make sure we got the proper file name for the real test later on.
28145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28146  if test "x$test_shortpath" = x; then
28147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28149    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28150  fi
28151
28152  # Call helper function which possibly converts this using DOS-style short mode.
28153  # If so, the updated path is stored in $new_path.
28154
28155  input_path="$new_path"
28156  # Check if we need to convert this using DOS-style short mode. If the path
28157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28158  # take no chances and rewrite it.
28159  # Note: m4 eats our [], so we need to use [ and ] instead.
28160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28161  if test "x$has_forbidden_chars" != x; then
28162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28166      # Going to short mode and back again did indeed matter. Since short mode is
28167      # case insensitive, let's make it lowercase to improve readability.
28168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28169      # Now convert it back to Unix-style (cygpath)
28170      input_path=`$CYGPATH -u "$shortmode_path"`
28171      new_path="$input_path"
28172    fi
28173  fi
28174
28175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28176  if test "x$test_cygdrive_prefix" = x; then
28177    # As a simple fix, exclude /usr/bin since it's not a real path.
28178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28180      # a path prefixed by /cygdrive for fixpath to work.
28181      new_path="$CYGWIN_ROOT_PATH$input_path"
28182    fi
28183  fi
28184
28185
28186  if test "x$path" != "x$new_path"; then
28187    BOOT_JDK="$new_path"
28188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28190  fi
28191
28192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28193
28194  path="$BOOT_JDK"
28195  has_colon=`$ECHO $path | $GREP ^.:`
28196  new_path="$path"
28197  if test "x$has_colon" = x; then
28198    # Not in mixed or Windows style, start by that.
28199    new_path=`cmd //c echo $path`
28200  fi
28201
28202
28203  input_path="$new_path"
28204  # Check if we need to convert this using DOS-style short mode. If the path
28205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28206  # take no chances and rewrite it.
28207  # Note: m4 eats our [], so we need to use [ and ] instead.
28208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28209  if test "x$has_forbidden_chars" != x; then
28210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28212  fi
28213
28214
28215  windows_path="$new_path"
28216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28217    unix_path=`$CYGPATH -u "$windows_path"`
28218    new_path="$unix_path"
28219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28221    new_path="$unix_path"
28222  fi
28223
28224  if test "x$path" != "x$new_path"; then
28225    BOOT_JDK="$new_path"
28226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28228  fi
28229
28230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28232
28233    else
28234      # We're on a unix platform. Hooray! :)
28235      path="$BOOT_JDK"
28236      has_space=`$ECHO "$path" | $GREP " "`
28237      if test "x$has_space" != x; then
28238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28241      fi
28242
28243      # Use eval to expand a potential ~
28244      eval path="$path"
28245      if test ! -f "$path" && test ! -d "$path"; then
28246        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28247      fi
28248
28249      if test -d "$path"; then
28250        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28251      else
28252        dir="`$DIRNAME "$path"`"
28253        base="`$BASENAME "$path"`"
28254        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28255      fi
28256    fi
28257  fi
28258
28259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28260$as_echo_n "checking for Boot JDK... " >&6; }
28261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28262$as_echo "$BOOT_JDK" >&6; }
28263            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28264$as_echo_n "checking Boot JDK version... " >&6; }
28265            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28267$as_echo "$BOOT_JDK_VERSION" >&6; }
28268          fi # end check jdk version
28269        fi # end check javac
28270      fi # end check java
28271    fi # end check boot jdk found
28272  fi
28273
28274  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28275
28276  if test "x$BOOT_JDK_FOUND" = xno; then
28277    # Now execute the test
28278
28279  BOOT_JDK_PREFIX="/usr/lib/jvm"
28280  BOOT_JDK_SUFFIX=""
28281  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28282  if test "x$ALL_JDKS_FOUND" != x; then
28283    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28284
28285  if test "x$BOOT_JDK_FOUND" = xno; then
28286    # Now execute the test
28287
28288        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28289        if test -d "$BOOT_JDK"; then
28290          BOOT_JDK_FOUND=maybe
28291          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28292$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28293        fi
28294
28295
28296    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28297    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28298      # Do we have a bin/java?
28299      if test ! -x "$BOOT_JDK/bin/java"; then
28300        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28302        BOOT_JDK_FOUND=no
28303      else
28304        # Do we have a bin/javac?
28305        if test ! -x "$BOOT_JDK/bin/javac"; then
28306          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28307$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28308          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28309$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28310          BOOT_JDK_FOUND=no
28311        else
28312          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28313          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28314
28315          # Extra M4 quote needed to protect [] in grep expression.
28316          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28317          if test "x$FOUND_CORRECT_VERSION" = x; then
28318            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28320            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28321$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28322            BOOT_JDK_FOUND=no
28323          else
28324            # We're done! :-)
28325            BOOT_JDK_FOUND=yes
28326
28327  # Only process if variable expands to non-empty
28328
28329  if test "x$BOOT_JDK" != x; then
28330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28331
28332  # Input might be given as Windows format, start by converting to
28333  # unix format.
28334  path="$BOOT_JDK"
28335  new_path=`$CYGPATH -u "$path"`
28336
28337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28340  # "foo.exe" is OK but "foo" is an error.
28341  #
28342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28343  # It is also a way to make sure we got the proper file name for the real test later on.
28344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28345  if test "x$test_shortpath" = x; then
28346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28348    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28349  fi
28350
28351  # Call helper function which possibly converts this using DOS-style short mode.
28352  # If so, the updated path is stored in $new_path.
28353
28354  input_path="$new_path"
28355  # Check if we need to convert this using DOS-style short mode. If the path
28356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28357  # take no chances and rewrite it.
28358  # Note: m4 eats our [], so we need to use [ and ] instead.
28359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28360  if test "x$has_forbidden_chars" != x; then
28361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28365      # Going to short mode and back again did indeed matter. Since short mode is
28366      # case insensitive, let's make it lowercase to improve readability.
28367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28368      # Now convert it back to Unix-style (cygpath)
28369      input_path=`$CYGPATH -u "$shortmode_path"`
28370      new_path="$input_path"
28371    fi
28372  fi
28373
28374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28375  if test "x$test_cygdrive_prefix" = x; then
28376    # As a simple fix, exclude /usr/bin since it's not a real path.
28377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28379      # a path prefixed by /cygdrive for fixpath to work.
28380      new_path="$CYGWIN_ROOT_PATH$input_path"
28381    fi
28382  fi
28383
28384
28385  if test "x$path" != "x$new_path"; then
28386    BOOT_JDK="$new_path"
28387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28389  fi
28390
28391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28392
28393  path="$BOOT_JDK"
28394  has_colon=`$ECHO $path | $GREP ^.:`
28395  new_path="$path"
28396  if test "x$has_colon" = x; then
28397    # Not in mixed or Windows style, start by that.
28398    new_path=`cmd //c echo $path`
28399  fi
28400
28401
28402  input_path="$new_path"
28403  # Check if we need to convert this using DOS-style short mode. If the path
28404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28405  # take no chances and rewrite it.
28406  # Note: m4 eats our [], so we need to use [ and ] instead.
28407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28408  if test "x$has_forbidden_chars" != x; then
28409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28411  fi
28412
28413
28414  windows_path="$new_path"
28415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28416    unix_path=`$CYGPATH -u "$windows_path"`
28417    new_path="$unix_path"
28418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28420    new_path="$unix_path"
28421  fi
28422
28423  if test "x$path" != "x$new_path"; then
28424    BOOT_JDK="$new_path"
28425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28427  fi
28428
28429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28431
28432    else
28433      # We're on a unix platform. Hooray! :)
28434      path="$BOOT_JDK"
28435      has_space=`$ECHO "$path" | $GREP " "`
28436      if test "x$has_space" != x; then
28437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28440      fi
28441
28442      # Use eval to expand a potential ~
28443      eval path="$path"
28444      if test ! -f "$path" && test ! -d "$path"; then
28445        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28446      fi
28447
28448      if test -d "$path"; then
28449        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28450      else
28451        dir="`$DIRNAME "$path"`"
28452        base="`$BASENAME "$path"`"
28453        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28454      fi
28455    fi
28456  fi
28457
28458            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28459$as_echo_n "checking for Boot JDK... " >&6; }
28460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28461$as_echo "$BOOT_JDK" >&6; }
28462            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28463$as_echo_n "checking Boot JDK version... " >&6; }
28464            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28466$as_echo "$BOOT_JDK_VERSION" >&6; }
28467          fi # end check jdk version
28468        fi # end check javac
28469      fi # end check java
28470    fi # end check boot jdk found
28471  fi
28472
28473    done
28474  fi
28475
28476
28477    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28478    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28479      # Do we have a bin/java?
28480      if test ! -x "$BOOT_JDK/bin/java"; then
28481        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28482$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28483        BOOT_JDK_FOUND=no
28484      else
28485        # Do we have a bin/javac?
28486        if test ! -x "$BOOT_JDK/bin/javac"; then
28487          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28489          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28490$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28491          BOOT_JDK_FOUND=no
28492        else
28493          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28494          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28495
28496          # Extra M4 quote needed to protect [] in grep expression.
28497          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28498          if test "x$FOUND_CORRECT_VERSION" = x; then
28499            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28501            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28502$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28503            BOOT_JDK_FOUND=no
28504          else
28505            # We're done! :-)
28506            BOOT_JDK_FOUND=yes
28507
28508  # Only process if variable expands to non-empty
28509
28510  if test "x$BOOT_JDK" != x; then
28511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28512
28513  # Input might be given as Windows format, start by converting to
28514  # unix format.
28515  path="$BOOT_JDK"
28516  new_path=`$CYGPATH -u "$path"`
28517
28518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28521  # "foo.exe" is OK but "foo" is an error.
28522  #
28523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28524  # It is also a way to make sure we got the proper file name for the real test later on.
28525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28526  if test "x$test_shortpath" = x; then
28527    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28529    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28530  fi
28531
28532  # Call helper function which possibly converts this using DOS-style short mode.
28533  # If so, the updated path is stored in $new_path.
28534
28535  input_path="$new_path"
28536  # Check if we need to convert this using DOS-style short mode. If the path
28537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28538  # take no chances and rewrite it.
28539  # Note: m4 eats our [], so we need to use [ and ] instead.
28540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28541  if test "x$has_forbidden_chars" != x; then
28542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28546      # Going to short mode and back again did indeed matter. Since short mode is
28547      # case insensitive, let's make it lowercase to improve readability.
28548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28549      # Now convert it back to Unix-style (cygpath)
28550      input_path=`$CYGPATH -u "$shortmode_path"`
28551      new_path="$input_path"
28552    fi
28553  fi
28554
28555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28556  if test "x$test_cygdrive_prefix" = x; then
28557    # As a simple fix, exclude /usr/bin since it's not a real path.
28558    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28560      # a path prefixed by /cygdrive for fixpath to work.
28561      new_path="$CYGWIN_ROOT_PATH$input_path"
28562    fi
28563  fi
28564
28565
28566  if test "x$path" != "x$new_path"; then
28567    BOOT_JDK="$new_path"
28568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28570  fi
28571
28572    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28573
28574  path="$BOOT_JDK"
28575  has_colon=`$ECHO $path | $GREP ^.:`
28576  new_path="$path"
28577  if test "x$has_colon" = x; then
28578    # Not in mixed or Windows style, start by that.
28579    new_path=`cmd //c echo $path`
28580  fi
28581
28582
28583  input_path="$new_path"
28584  # Check if we need to convert this using DOS-style short mode. If the path
28585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28586  # take no chances and rewrite it.
28587  # Note: m4 eats our [], so we need to use [ and ] instead.
28588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28589  if test "x$has_forbidden_chars" != x; then
28590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28592  fi
28593
28594
28595  windows_path="$new_path"
28596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28597    unix_path=`$CYGPATH -u "$windows_path"`
28598    new_path="$unix_path"
28599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28601    new_path="$unix_path"
28602  fi
28603
28604  if test "x$path" != "x$new_path"; then
28605    BOOT_JDK="$new_path"
28606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28607$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28608  fi
28609
28610  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28611  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28612
28613    else
28614      # We're on a unix platform. Hooray! :)
28615      path="$BOOT_JDK"
28616      has_space=`$ECHO "$path" | $GREP " "`
28617      if test "x$has_space" != x; then
28618        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28619$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28620        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28621      fi
28622
28623      # Use eval to expand a potential ~
28624      eval path="$path"
28625      if test ! -f "$path" && test ! -d "$path"; then
28626        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28627      fi
28628
28629      if test -d "$path"; then
28630        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28631      else
28632        dir="`$DIRNAME "$path"`"
28633        base="`$BASENAME "$path"`"
28634        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28635      fi
28636    fi
28637  fi
28638
28639            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28640$as_echo_n "checking for Boot JDK... " >&6; }
28641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28642$as_echo "$BOOT_JDK" >&6; }
28643            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28644$as_echo_n "checking Boot JDK version... " >&6; }
28645            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28647$as_echo "$BOOT_JDK_VERSION" >&6; }
28648          fi # end check jdk version
28649        fi # end check javac
28650      fi # end check java
28651    fi # end check boot jdk found
28652  fi
28653
28654  fi
28655
28656
28657    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28658    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28659      # Do we have a bin/java?
28660      if test ! -x "$BOOT_JDK/bin/java"; then
28661        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28663        BOOT_JDK_FOUND=no
28664      else
28665        # Do we have a bin/javac?
28666        if test ! -x "$BOOT_JDK/bin/javac"; then
28667          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28668$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28669          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28670$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28671          BOOT_JDK_FOUND=no
28672        else
28673          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28674          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28675
28676          # Extra M4 quote needed to protect [] in grep expression.
28677          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28678          if test "x$FOUND_CORRECT_VERSION" = x; then
28679            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28681            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28682$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28683            BOOT_JDK_FOUND=no
28684          else
28685            # We're done! :-)
28686            BOOT_JDK_FOUND=yes
28687
28688  # Only process if variable expands to non-empty
28689
28690  if test "x$BOOT_JDK" != x; then
28691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28692
28693  # Input might be given as Windows format, start by converting to
28694  # unix format.
28695  path="$BOOT_JDK"
28696  new_path=`$CYGPATH -u "$path"`
28697
28698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28701  # "foo.exe" is OK but "foo" is an error.
28702  #
28703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28704  # It is also a way to make sure we got the proper file name for the real test later on.
28705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28706  if test "x$test_shortpath" = x; then
28707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28709    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28710  fi
28711
28712  # Call helper function which possibly converts this using DOS-style short mode.
28713  # If so, the updated path is stored in $new_path.
28714
28715  input_path="$new_path"
28716  # Check if we need to convert this using DOS-style short mode. If the path
28717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28718  # take no chances and rewrite it.
28719  # Note: m4 eats our [], so we need to use [ and ] instead.
28720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28721  if test "x$has_forbidden_chars" != x; then
28722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28726      # Going to short mode and back again did indeed matter. Since short mode is
28727      # case insensitive, let's make it lowercase to improve readability.
28728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28729      # Now convert it back to Unix-style (cygpath)
28730      input_path=`$CYGPATH -u "$shortmode_path"`
28731      new_path="$input_path"
28732    fi
28733  fi
28734
28735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28736  if test "x$test_cygdrive_prefix" = x; then
28737    # As a simple fix, exclude /usr/bin since it's not a real path.
28738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28740      # a path prefixed by /cygdrive for fixpath to work.
28741      new_path="$CYGWIN_ROOT_PATH$input_path"
28742    fi
28743  fi
28744
28745
28746  if test "x$path" != "x$new_path"; then
28747    BOOT_JDK="$new_path"
28748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28750  fi
28751
28752    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28753
28754  path="$BOOT_JDK"
28755  has_colon=`$ECHO $path | $GREP ^.:`
28756  new_path="$path"
28757  if test "x$has_colon" = x; then
28758    # Not in mixed or Windows style, start by that.
28759    new_path=`cmd //c echo $path`
28760  fi
28761
28762
28763  input_path="$new_path"
28764  # Check if we need to convert this using DOS-style short mode. If the path
28765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28766  # take no chances and rewrite it.
28767  # Note: m4 eats our [], so we need to use [ and ] instead.
28768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28769  if test "x$has_forbidden_chars" != x; then
28770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28772  fi
28773
28774
28775  windows_path="$new_path"
28776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28777    unix_path=`$CYGPATH -u "$windows_path"`
28778    new_path="$unix_path"
28779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28781    new_path="$unix_path"
28782  fi
28783
28784  if test "x$path" != "x$new_path"; then
28785    BOOT_JDK="$new_path"
28786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28788  fi
28789
28790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28792
28793    else
28794      # We're on a unix platform. Hooray! :)
28795      path="$BOOT_JDK"
28796      has_space=`$ECHO "$path" | $GREP " "`
28797      if test "x$has_space" != x; then
28798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28800        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28801      fi
28802
28803      # Use eval to expand a potential ~
28804      eval path="$path"
28805      if test ! -f "$path" && test ! -d "$path"; then
28806        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28807      fi
28808
28809      if test -d "$path"; then
28810        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28811      else
28812        dir="`$DIRNAME "$path"`"
28813        base="`$BASENAME "$path"`"
28814        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28815      fi
28816    fi
28817  fi
28818
28819            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28820$as_echo_n "checking for Boot JDK... " >&6; }
28821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28822$as_echo "$BOOT_JDK" >&6; }
28823            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28824$as_echo_n "checking Boot JDK version... " >&6; }
28825            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28827$as_echo "$BOOT_JDK_VERSION" >&6; }
28828          fi # end check jdk version
28829        fi # end check javac
28830      fi # end check java
28831    fi # end check boot jdk found
28832  fi
28833
28834
28835  # If we haven't found anything yet, we've truly lost. Give up.
28836  if test "x$BOOT_JDK_FOUND" = xno; then
28837
28838  # Print a helpful message on how to acquire the necessary build dependency.
28839  # openjdk is the help tag: freetype, cups, alsa etc
28840  MISSING_DEPENDENCY=openjdk
28841
28842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28843    cygwin_help $MISSING_DEPENDENCY
28844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28845    msys_help $MISSING_DEPENDENCY
28846  else
28847    PKGHANDLER_COMMAND=
28848
28849    case $PKGHANDLER in
28850      apt-get)
28851        apt_help     $MISSING_DEPENDENCY ;;
28852      yum)
28853        yum_help     $MISSING_DEPENDENCY ;;
28854      port)
28855        port_help    $MISSING_DEPENDENCY ;;
28856      pkgutil)
28857        pkgutil_help $MISSING_DEPENDENCY ;;
28858      pkgadd)
28859        pkgadd_help  $MISSING_DEPENDENCY ;;
28860    esac
28861
28862    if test "x$PKGHANDLER_COMMAND" != x; then
28863      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28864    fi
28865  fi
28866
28867    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28868$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28869    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28870$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28871    as_fn_error $? "Cannot continue" "$LINENO" 5
28872  fi
28873
28874
28875
28876  # Setup tools from the Boot JDK.
28877
28878  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28879
28880  # Publish this variable in the help.
28881
28882
28883  if [ -z "${JAVA+x}" ]; then
28884    # The variable is not set by user, try to locate tool using the code snippet
28885
28886      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28887$as_echo_n "checking for java in Boot JDK... " >&6; }
28888      JAVA=$BOOT_JDK/bin/java
28889      if test ! -x $JAVA; then
28890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28891$as_echo "not found" >&6; }
28892        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28893$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28894        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28895      fi
28896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28897$as_echo "ok" >&6; }
28898
28899
28900  else
28901    # The variable is set, but is it from the command line or the environment?
28902
28903    # Try to remove the string !JAVA! from our list.
28904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28906      # If it failed, the variable was not from the command line. Ignore it,
28907      # but warn the user (except for BASH, which is always set by the calling BASH).
28908      if test "xJAVA" != xBASH; then
28909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28910$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28911      fi
28912      # Try to locate tool using the code snippet
28913
28914      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28915$as_echo_n "checking for java in Boot JDK... " >&6; }
28916      JAVA=$BOOT_JDK/bin/java
28917      if test ! -x $JAVA; then
28918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28919$as_echo "not found" >&6; }
28920        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28921$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28922        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28923      fi
28924      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28925$as_echo "ok" >&6; }
28926
28927
28928    else
28929      # If it succeeded, then it was overridden by the user. We will use it
28930      # for the tool.
28931
28932      # First remove it from the list of overridden variables, so we can test
28933      # for unknown variables in the end.
28934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28935
28936      # Check if we try to supply an empty value
28937      if test "x$JAVA" = x; then
28938        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28939$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28941$as_echo_n "checking for JAVA... " >&6; }
28942        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28943$as_echo "disabled" >&6; }
28944      else
28945        # Check if the provided tool contains a complete path.
28946        tool_specified="$JAVA"
28947        tool_basename="${tool_specified##*/}"
28948        if test "x$tool_basename" = "x$tool_specified"; then
28949          # A command without a complete path is provided, search $PATH.
28950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28951$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28952          # Extract the first word of "$tool_basename", so it can be a program name with args.
28953set dummy $tool_basename; ac_word=$2
28954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28955$as_echo_n "checking for $ac_word... " >&6; }
28956if ${ac_cv_path_JAVA+:} false; then :
28957  $as_echo_n "(cached) " >&6
28958else
28959  case $JAVA in
28960  [\\/]* | ?:[\\/]*)
28961  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28962  ;;
28963  *)
28964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28965for as_dir in $PATH
28966do
28967  IFS=$as_save_IFS
28968  test -z "$as_dir" && as_dir=.
28969    for ac_exec_ext in '' $ac_executable_extensions; do
28970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28971    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28973    break 2
28974  fi
28975done
28976  done
28977IFS=$as_save_IFS
28978
28979  ;;
28980esac
28981fi
28982JAVA=$ac_cv_path_JAVA
28983if test -n "$JAVA"; then
28984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28985$as_echo "$JAVA" >&6; }
28986else
28987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28988$as_echo "no" >&6; }
28989fi
28990
28991
28992          if test "x$JAVA" = x; then
28993            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28994          fi
28995        else
28996          # Otherwise we believe it is a complete path. Use it as it is.
28997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28998$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28999          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29000$as_echo_n "checking for JAVA... " >&6; }
29001          if test ! -x "$tool_specified"; then
29002            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29003$as_echo "not found" >&6; }
29004            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29005          fi
29006          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29007$as_echo "$tool_specified" >&6; }
29008        fi
29009      fi
29010    fi
29011
29012  fi
29013
29014
29015
29016  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29017
29018  # Publish this variable in the help.
29019
29020
29021  if [ -z "${JAVAC+x}" ]; then
29022    # The variable is not set by user, try to locate tool using the code snippet
29023
29024      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29025$as_echo_n "checking for javac in Boot JDK... " >&6; }
29026      JAVAC=$BOOT_JDK/bin/javac
29027      if test ! -x $JAVAC; then
29028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29029$as_echo "not found" >&6; }
29030        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29031$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29032        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29033      fi
29034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29035$as_echo "ok" >&6; }
29036
29037
29038  else
29039    # The variable is set, but is it from the command line or the environment?
29040
29041    # Try to remove the string !JAVAC! from our list.
29042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29044      # If it failed, the variable was not from the command line. Ignore it,
29045      # but warn the user (except for BASH, which is always set by the calling BASH).
29046      if test "xJAVAC" != xBASH; then
29047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29048$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29049      fi
29050      # Try to locate tool using the code snippet
29051
29052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29053$as_echo_n "checking for javac in Boot JDK... " >&6; }
29054      JAVAC=$BOOT_JDK/bin/javac
29055      if test ! -x $JAVAC; then
29056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29057$as_echo "not found" >&6; }
29058        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29059$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29060        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29061      fi
29062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29063$as_echo "ok" >&6; }
29064
29065
29066    else
29067      # If it succeeded, then it was overridden by the user. We will use it
29068      # for the tool.
29069
29070      # First remove it from the list of overridden variables, so we can test
29071      # for unknown variables in the end.
29072      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29073
29074      # Check if we try to supply an empty value
29075      if test "x$JAVAC" = x; then
29076        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29077$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29078        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29079$as_echo_n "checking for JAVAC... " >&6; }
29080        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29081$as_echo "disabled" >&6; }
29082      else
29083        # Check if the provided tool contains a complete path.
29084        tool_specified="$JAVAC"
29085        tool_basename="${tool_specified##*/}"
29086        if test "x$tool_basename" = "x$tool_specified"; then
29087          # A command without a complete path is provided, search $PATH.
29088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29089$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29090          # Extract the first word of "$tool_basename", so it can be a program name with args.
29091set dummy $tool_basename; ac_word=$2
29092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29093$as_echo_n "checking for $ac_word... " >&6; }
29094if ${ac_cv_path_JAVAC+:} false; then :
29095  $as_echo_n "(cached) " >&6
29096else
29097  case $JAVAC in
29098  [\\/]* | ?:[\\/]*)
29099  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29100  ;;
29101  *)
29102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29103for as_dir in $PATH
29104do
29105  IFS=$as_save_IFS
29106  test -z "$as_dir" && as_dir=.
29107    for ac_exec_ext in '' $ac_executable_extensions; do
29108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29109    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29111    break 2
29112  fi
29113done
29114  done
29115IFS=$as_save_IFS
29116
29117  ;;
29118esac
29119fi
29120JAVAC=$ac_cv_path_JAVAC
29121if test -n "$JAVAC"; then
29122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29123$as_echo "$JAVAC" >&6; }
29124else
29125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29126$as_echo "no" >&6; }
29127fi
29128
29129
29130          if test "x$JAVAC" = x; then
29131            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29132          fi
29133        else
29134          # Otherwise we believe it is a complete path. Use it as it is.
29135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29136$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29137          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29138$as_echo_n "checking for JAVAC... " >&6; }
29139          if test ! -x "$tool_specified"; then
29140            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29141$as_echo "not found" >&6; }
29142            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29143          fi
29144          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29145$as_echo "$tool_specified" >&6; }
29146        fi
29147      fi
29148    fi
29149
29150  fi
29151
29152
29153
29154  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29155
29156  # Publish this variable in the help.
29157
29158
29159  if [ -z "${JAVAH+x}" ]; then
29160    # The variable is not set by user, try to locate tool using the code snippet
29161
29162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29163$as_echo_n "checking for javah in Boot JDK... " >&6; }
29164      JAVAH=$BOOT_JDK/bin/javah
29165      if test ! -x $JAVAH; then
29166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29167$as_echo "not found" >&6; }
29168        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29169$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29170        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29171      fi
29172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29173$as_echo "ok" >&6; }
29174
29175
29176  else
29177    # The variable is set, but is it from the command line or the environment?
29178
29179    # Try to remove the string !JAVAH! from our list.
29180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29182      # If it failed, the variable was not from the command line. Ignore it,
29183      # but warn the user (except for BASH, which is always set by the calling BASH).
29184      if test "xJAVAH" != xBASH; then
29185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29186$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29187      fi
29188      # Try to locate tool using the code snippet
29189
29190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29191$as_echo_n "checking for javah in Boot JDK... " >&6; }
29192      JAVAH=$BOOT_JDK/bin/javah
29193      if test ! -x $JAVAH; then
29194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29195$as_echo "not found" >&6; }
29196        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29197$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29198        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29199      fi
29200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29201$as_echo "ok" >&6; }
29202
29203
29204    else
29205      # If it succeeded, then it was overridden by the user. We will use it
29206      # for the tool.
29207
29208      # First remove it from the list of overridden variables, so we can test
29209      # for unknown variables in the end.
29210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29211
29212      # Check if we try to supply an empty value
29213      if test "x$JAVAH" = x; then
29214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29215$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29217$as_echo_n "checking for JAVAH... " >&6; }
29218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29219$as_echo "disabled" >&6; }
29220      else
29221        # Check if the provided tool contains a complete path.
29222        tool_specified="$JAVAH"
29223        tool_basename="${tool_specified##*/}"
29224        if test "x$tool_basename" = "x$tool_specified"; then
29225          # A command without a complete path is provided, search $PATH.
29226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29227$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29228          # Extract the first word of "$tool_basename", so it can be a program name with args.
29229set dummy $tool_basename; ac_word=$2
29230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29231$as_echo_n "checking for $ac_word... " >&6; }
29232if ${ac_cv_path_JAVAH+:} false; then :
29233  $as_echo_n "(cached) " >&6
29234else
29235  case $JAVAH in
29236  [\\/]* | ?:[\\/]*)
29237  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29238  ;;
29239  *)
29240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29241for as_dir in $PATH
29242do
29243  IFS=$as_save_IFS
29244  test -z "$as_dir" && as_dir=.
29245    for ac_exec_ext in '' $ac_executable_extensions; do
29246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29247    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29249    break 2
29250  fi
29251done
29252  done
29253IFS=$as_save_IFS
29254
29255  ;;
29256esac
29257fi
29258JAVAH=$ac_cv_path_JAVAH
29259if test -n "$JAVAH"; then
29260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29261$as_echo "$JAVAH" >&6; }
29262else
29263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29264$as_echo "no" >&6; }
29265fi
29266
29267
29268          if test "x$JAVAH" = x; then
29269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29270          fi
29271        else
29272          # Otherwise we believe it is a complete path. Use it as it is.
29273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29274$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29276$as_echo_n "checking for JAVAH... " >&6; }
29277          if test ! -x "$tool_specified"; then
29278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29279$as_echo "not found" >&6; }
29280            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29281          fi
29282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29283$as_echo "$tool_specified" >&6; }
29284        fi
29285      fi
29286    fi
29287
29288  fi
29289
29290
29291
29292  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29293
29294  # Publish this variable in the help.
29295
29296
29297  if [ -z "${JAR+x}" ]; then
29298    # The variable is not set by user, try to locate tool using the code snippet
29299
29300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29301$as_echo_n "checking for jar in Boot JDK... " >&6; }
29302      JAR=$BOOT_JDK/bin/jar
29303      if test ! -x $JAR; then
29304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29305$as_echo "not found" >&6; }
29306        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29307$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29308        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29309      fi
29310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29311$as_echo "ok" >&6; }
29312
29313
29314  else
29315    # The variable is set, but is it from the command line or the environment?
29316
29317    # Try to remove the string !JAR! from our list.
29318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29320      # If it failed, the variable was not from the command line. Ignore it,
29321      # but warn the user (except for BASH, which is always set by the calling BASH).
29322      if test "xJAR" != xBASH; then
29323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29324$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29325      fi
29326      # Try to locate tool using the code snippet
29327
29328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29329$as_echo_n "checking for jar in Boot JDK... " >&6; }
29330      JAR=$BOOT_JDK/bin/jar
29331      if test ! -x $JAR; then
29332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29333$as_echo "not found" >&6; }
29334        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29335$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29336        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29337      fi
29338      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29339$as_echo "ok" >&6; }
29340
29341
29342    else
29343      # If it succeeded, then it was overridden by the user. We will use it
29344      # for the tool.
29345
29346      # First remove it from the list of overridden variables, so we can test
29347      # for unknown variables in the end.
29348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29349
29350      # Check if we try to supply an empty value
29351      if test "x$JAR" = x; then
29352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29353$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29355$as_echo_n "checking for JAR... " >&6; }
29356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29357$as_echo "disabled" >&6; }
29358      else
29359        # Check if the provided tool contains a complete path.
29360        tool_specified="$JAR"
29361        tool_basename="${tool_specified##*/}"
29362        if test "x$tool_basename" = "x$tool_specified"; then
29363          # A command without a complete path is provided, search $PATH.
29364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29365$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29366          # Extract the first word of "$tool_basename", so it can be a program name with args.
29367set dummy $tool_basename; ac_word=$2
29368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29369$as_echo_n "checking for $ac_word... " >&6; }
29370if ${ac_cv_path_JAR+:} false; then :
29371  $as_echo_n "(cached) " >&6
29372else
29373  case $JAR in
29374  [\\/]* | ?:[\\/]*)
29375  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29376  ;;
29377  *)
29378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29379for as_dir in $PATH
29380do
29381  IFS=$as_save_IFS
29382  test -z "$as_dir" && as_dir=.
29383    for ac_exec_ext in '' $ac_executable_extensions; do
29384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29385    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29387    break 2
29388  fi
29389done
29390  done
29391IFS=$as_save_IFS
29392
29393  ;;
29394esac
29395fi
29396JAR=$ac_cv_path_JAR
29397if test -n "$JAR"; then
29398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29399$as_echo "$JAR" >&6; }
29400else
29401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29402$as_echo "no" >&6; }
29403fi
29404
29405
29406          if test "x$JAR" = x; then
29407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29408          fi
29409        else
29410          # Otherwise we believe it is a complete path. Use it as it is.
29411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29412$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29414$as_echo_n "checking for JAR... " >&6; }
29415          if test ! -x "$tool_specified"; then
29416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29417$as_echo "not found" >&6; }
29418            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29419          fi
29420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29421$as_echo "$tool_specified" >&6; }
29422        fi
29423      fi
29424    fi
29425
29426  fi
29427
29428
29429
29430  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29431
29432  # Publish this variable in the help.
29433
29434
29435  if [ -z "${JARSIGNER+x}" ]; then
29436    # The variable is not set by user, try to locate tool using the code snippet
29437
29438      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29439$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29440      JARSIGNER=$BOOT_JDK/bin/jarsigner
29441      if test ! -x $JARSIGNER; then
29442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29443$as_echo "not found" >&6; }
29444        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29445$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29446        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29447      fi
29448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29449$as_echo "ok" >&6; }
29450
29451
29452  else
29453    # The variable is set, but is it from the command line or the environment?
29454
29455    # Try to remove the string !JARSIGNER! from our list.
29456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29458      # If it failed, the variable was not from the command line. Ignore it,
29459      # but warn the user (except for BASH, which is always set by the calling BASH).
29460      if test "xJARSIGNER" != xBASH; then
29461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29462$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29463      fi
29464      # Try to locate tool using the code snippet
29465
29466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29467$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29468      JARSIGNER=$BOOT_JDK/bin/jarsigner
29469      if test ! -x $JARSIGNER; then
29470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29471$as_echo "not found" >&6; }
29472        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29473$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29474        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29475      fi
29476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29477$as_echo "ok" >&6; }
29478
29479
29480    else
29481      # If it succeeded, then it was overridden by the user. We will use it
29482      # for the tool.
29483
29484      # First remove it from the list of overridden variables, so we can test
29485      # for unknown variables in the end.
29486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29487
29488      # Check if we try to supply an empty value
29489      if test "x$JARSIGNER" = x; then
29490        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29491$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29492        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29493$as_echo_n "checking for JARSIGNER... " >&6; }
29494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29495$as_echo "disabled" >&6; }
29496      else
29497        # Check if the provided tool contains a complete path.
29498        tool_specified="$JARSIGNER"
29499        tool_basename="${tool_specified##*/}"
29500        if test "x$tool_basename" = "x$tool_specified"; then
29501          # A command without a complete path is provided, search $PATH.
29502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29503$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29504          # Extract the first word of "$tool_basename", so it can be a program name with args.
29505set dummy $tool_basename; ac_word=$2
29506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29507$as_echo_n "checking for $ac_word... " >&6; }
29508if ${ac_cv_path_JARSIGNER+:} false; then :
29509  $as_echo_n "(cached) " >&6
29510else
29511  case $JARSIGNER in
29512  [\\/]* | ?:[\\/]*)
29513  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29514  ;;
29515  *)
29516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29517for as_dir in $PATH
29518do
29519  IFS=$as_save_IFS
29520  test -z "$as_dir" && as_dir=.
29521    for ac_exec_ext in '' $ac_executable_extensions; do
29522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29523    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29525    break 2
29526  fi
29527done
29528  done
29529IFS=$as_save_IFS
29530
29531  ;;
29532esac
29533fi
29534JARSIGNER=$ac_cv_path_JARSIGNER
29535if test -n "$JARSIGNER"; then
29536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29537$as_echo "$JARSIGNER" >&6; }
29538else
29539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29540$as_echo "no" >&6; }
29541fi
29542
29543
29544          if test "x$JARSIGNER" = x; then
29545            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29546          fi
29547        else
29548          # Otherwise we believe it is a complete path. Use it as it is.
29549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29550$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29551          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29552$as_echo_n "checking for JARSIGNER... " >&6; }
29553          if test ! -x "$tool_specified"; then
29554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29555$as_echo "not found" >&6; }
29556            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29557          fi
29558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29559$as_echo "$tool_specified" >&6; }
29560        fi
29561      fi
29562    fi
29563
29564  fi
29565
29566
29567
29568  # Finally, set some other options...
29569
29570  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29571  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29572
29573
29574
29575  # Check if the boot jdk is 32 or 64 bit
29576  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29577    BOOT_JDK_BITS="64"
29578  else
29579    BOOT_JDK_BITS="32"
29580  fi
29581  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29582$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29584$as_echo "$BOOT_JDK_BITS" >&6; }
29585
29586
29587
29588###############################################################################
29589#
29590# Configure the sources to use. We can add or override individual directories.
29591#
29592###############################################################################
29593
29594
29595  # Where are the sources.
29596  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29597  CORBA_TOPDIR="$SRC_ROOT/corba"
29598  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29599  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29600  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29601  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29602  JDK_TOPDIR="$SRC_ROOT/jdk"
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612  # This feature is no longer supported.
29613
29614
29615
29616# Check whether --with-add-source-root was given.
29617if test "${with_add_source_root+set}" = set; then :
29618  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
29619$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29620fi
29621
29622
29623
29624
29625# Check whether --with-override-source-root was given.
29626if test "${with_override_source_root+set}" = set; then :
29627  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
29628$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29629fi
29630
29631
29632
29633
29634# Check whether --with-adds-and-overrides was given.
29635if test "${with_adds_and_overrides+set}" = set; then :
29636  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
29637$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29638fi
29639
29640
29641
29642
29643# Check whether --with-override-langtools was given.
29644if test "${with_override_langtools+set}" = set; then :
29645  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29646$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29647fi
29648
29649
29650
29651
29652# Check whether --with-override-corba was given.
29653if test "${with_override_corba+set}" = set; then :
29654  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29655$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29656fi
29657
29658
29659
29660
29661# Check whether --with-override-jaxp was given.
29662if test "${with_override_jaxp+set}" = set; then :
29663  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29664$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29665fi
29666
29667
29668
29669
29670# Check whether --with-override-jaxws was given.
29671if test "${with_override_jaxws+set}" = set; then :
29672  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29673$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29674fi
29675
29676
29677
29678
29679# Check whether --with-override-hotspot was given.
29680if test "${with_override_hotspot+set}" = set; then :
29681  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29682$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29683fi
29684
29685
29686
29687
29688# Check whether --with-override-nashorn was given.
29689if test "${with_override_nashorn+set}" = set; then :
29690  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29691$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29692fi
29693
29694
29695
29696
29697# Check whether --with-override-jdk was given.
29698if test "${with_override_jdk+set}" = set; then :
29699  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29700$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29701fi
29702
29703
29704
29705
29706  BUILD_OUTPUT="$OUTPUT_ROOT"
29707
29708
29709  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29710  BUILD_HOTSPOT=true
29711
29712
29713
29714# Check whether --with-import-hotspot was given.
29715if test "${with_import_hotspot+set}" = set; then :
29716  withval=$with_import_hotspot;
29717fi
29718
29719  if test "x$with_import_hotspot" != x; then
29720    CURDIR="$PWD"
29721    cd "$with_import_hotspot"
29722    HOTSPOT_DIST="`pwd`"
29723    cd "$CURDIR"
29724    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29725      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29726    fi
29727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29728$as_echo_n "checking if hotspot should be imported... " >&6; }
29729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29730$as_echo "yes from $HOTSPOT_DIST" >&6; }
29731    BUILD_HOTSPOT=false
29732  fi
29733
29734  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29735
29736
29737###############################################################################
29738#
29739# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29740# native code.
29741#
29742###############################################################################
29743
29744# See if we are doing a complete static build or not
29745
29746  # Check whether --enable-static-build was given.
29747if test "${enable_static_build+set}" = set; then :
29748  enableval=$enable_static_build;
29749fi
29750
29751  STATIC_BUILD=false
29752  if test "x$enable_static_build" = "xyes"; then
29753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29754$as_echo_n "checking if static build is enabled... " >&6; }
29755    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29756$as_echo "yes" >&6; }
29757    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29758      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29759    fi
29760    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29761    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29762    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29763    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29764    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29765    STATIC_BUILD=true
29766  elif test "x$enable_static_build" = "xno"; then
29767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29768$as_echo_n "checking if static build is enabled... " >&6; }
29769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29770$as_echo "no" >&6; }
29771  elif test "x$enable_static_build" != "x"; then
29772    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29773  fi
29774
29775
29776
29777
29778# First determine the toolchain type (compiler family)
29779
29780
29781# Check whether --with-toolchain-type was given.
29782if test "${with_toolchain_type+set}" = set; then :
29783  withval=$with_toolchain_type;
29784fi
29785
29786
29787  # Use indirect variable referencing
29788  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29789  VALID_TOOLCHAINS=${!toolchain_var_name}
29790
29791  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29792    if test -n "$XCODEBUILD"; then
29793      # On Mac OS X, default toolchain to clang after Xcode 5
29794      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29795      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29796      if test $? -ne 0; then
29797        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29798      fi
29799      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29800          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29801          $CUT -f 1 -d .`
29802      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29803$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29804      if test $XCODE_MAJOR_VERSION -ge 5; then
29805          DEFAULT_TOOLCHAIN="clang"
29806      else
29807          DEFAULT_TOOLCHAIN="gcc"
29808      fi
29809    else
29810      # If Xcode is not installed, but the command line tools are
29811      # then we can't run xcodebuild. On these systems we should
29812      # default to clang
29813      DEFAULT_TOOLCHAIN="clang"
29814    fi
29815  else
29816    # First toolchain type in the list is the default
29817    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29818  fi
29819
29820  if test "x$with_toolchain_type" = xlist; then
29821    # List all toolchains
29822    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29823$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29824    for toolchain in $VALID_TOOLCHAINS; do
29825      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29826      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29827      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29828    done
29829
29830    exit 0
29831  elif test "x$with_toolchain_type" != x; then
29832    # User override; check that it is valid
29833    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29834      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29835$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29836      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29837$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29838      as_fn_error $? "Cannot continue." "$LINENO" 5
29839    fi
29840    TOOLCHAIN_TYPE=$with_toolchain_type
29841  else
29842    # No flag given, use default
29843    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29844  fi
29845
29846
29847  TOOLCHAIN_CC_BINARY_clang="clang"
29848  TOOLCHAIN_CC_BINARY_gcc="gcc"
29849  TOOLCHAIN_CC_BINARY_microsoft="cl"
29850  TOOLCHAIN_CC_BINARY_solstudio="cc"
29851  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29852
29853  TOOLCHAIN_CXX_BINARY_clang="clang++"
29854  TOOLCHAIN_CXX_BINARY_gcc="g++"
29855  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29856  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29857  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29858
29859  # Use indirect variable referencing
29860  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29861  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29862  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29863  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29864  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29865  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29866
29867
29868  # Define filename patterns
29869  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29870    LIBRARY_PREFIX=
29871    SHARED_LIBRARY_SUFFIX='.dll'
29872    STATIC_LIBRARY_SUFFIX='.lib'
29873    SHARED_LIBRARY='$1.dll'
29874    STATIC_LIBRARY='$1.lib'
29875    OBJ_SUFFIX='.obj'
29876    EXE_SUFFIX='.exe'
29877  else
29878    LIBRARY_PREFIX=lib
29879    SHARED_LIBRARY_SUFFIX='.so'
29880    STATIC_LIBRARY_SUFFIX='.a'
29881    SHARED_LIBRARY='lib$1.so'
29882    STATIC_LIBRARY='lib$1.a'
29883    OBJ_SUFFIX='.o'
29884    EXE_SUFFIX=''
29885    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29886      # For full static builds, we're overloading the SHARED_LIBRARY
29887      # variables in order to limit the amount of changes required.
29888      # It would be better to remove SHARED and just use LIBRARY and
29889      # LIBRARY_SUFFIX for libraries that can be built either
29890      # shared or static and use STATIC_* for libraries that are
29891      # always built statically.
29892      if test "x$STATIC_BUILD" = xtrue; then
29893        SHARED_LIBRARY='lib$1.a'
29894        SHARED_LIBRARY_SUFFIX='.a'
29895      else
29896        SHARED_LIBRARY='lib$1.dylib'
29897        SHARED_LIBRARY_SUFFIX='.dylib'
29898      fi
29899    fi
29900  fi
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29912    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29913$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29914  else
29915    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29916$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29917  fi
29918
29919
29920# User supplied flags should be used when configure detects compilers
29921
29922  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29924$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29925  fi
29926
29927  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29928    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29929$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29930  fi
29931
29932  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29933    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29934$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29935  fi
29936
29937
29938# Check whether --with-extra-cflags was given.
29939if test "${with_extra_cflags+set}" = set; then :
29940  withval=$with_extra_cflags;
29941fi
29942
29943
29944
29945# Check whether --with-extra-cxxflags was given.
29946if test "${with_extra_cxxflags+set}" = set; then :
29947  withval=$with_extra_cxxflags;
29948fi
29949
29950
29951
29952# Check whether --with-extra-ldflags was given.
29953if test "${with_extra_ldflags+set}" = set; then :
29954  withval=$with_extra_ldflags;
29955fi
29956
29957
29958  EXTRA_CFLAGS="$with_extra_cflags"
29959  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29960  EXTRA_LDFLAGS="$with_extra_ldflags"
29961
29962  # Hotspot needs these set in their legacy form
29963  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29964  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29965  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29966
29967
29968
29969
29970
29971  # The global CFLAGS and LDLAGS variables are used by configure tests and
29972  # should include the extra parameters
29973  CFLAGS="$EXTRA_CFLAGS"
29974  CXXFLAGS="$EXTRA_CXXFLAGS"
29975  LDFLAGS="$EXTRA_LDFLAGS"
29976  CPPFLAGS=""
29977
29978# The sysroot cflags are needed for configure to be able to run the compilers
29979
29980  if test "x$SYSROOT" != "x"; then
29981    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29982      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29983        # Solaris Studio does not have a concept of sysroot. Instead we must
29984        # make sure the default include and lib dirs are appended to each
29985        # compile and link command line.
29986        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29987        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29988            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29989            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29990      fi
29991    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29992      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29993      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29994    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29995      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29996      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29997    fi
29998    # Propagate the sysroot args to hotspot
29999    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30000    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30001    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30002    # The global CFLAGS and LDFLAGS variables need these for configure to function
30003    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30004    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30005    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30006    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30007  fi
30008
30009  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30010    # We also need -iframework<path>/System/Library/Frameworks
30011    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30012    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30013    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30014    # set this here so it doesn't have to be peppered throughout the forest
30015    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30016    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30017  fi
30018
30019
30020
30021
30022
30023# Then detect the actual binaries needed
30024
30025  # FIXME: Is this needed?
30026  ac_ext=cpp
30027ac_cpp='$CXXCPP $CPPFLAGS'
30028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30031
30032
30033  # Store the CFLAGS etc passed to the configure script.
30034  ORG_CFLAGS="$CFLAGS"
30035  ORG_CXXFLAGS="$CXXFLAGS"
30036
30037  # autoconf magic only relies on PATH, so update it if tools dir is specified
30038  OLD_PATH="$PATH"
30039
30040  # On Windows, we need to detect the visual studio installation first.
30041  # This will change the PATH, but we need to keep that new PATH even
30042  # after toolchain detection is done, since the compiler (on x86) uses
30043  # it for DLL resolution in runtime.
30044  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
30045      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
30046
30047  # Store path to cygwin link.exe to help excluding it when searching for
30048  # VS linker. This must be done before changing the PATH when looking for VS.
30049  # Extract the first word of "link", so it can be a program name with args.
30050set dummy link; ac_word=$2
30051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30052$as_echo_n "checking for $ac_word... " >&6; }
30053if ${ac_cv_path_CYGWIN_LINK+:} false; then :
30054  $as_echo_n "(cached) " >&6
30055else
30056  case $CYGWIN_LINK in
30057  [\\/]* | ?:[\\/]*)
30058  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30059  ;;
30060  *)
30061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30062for as_dir in $PATH
30063do
30064  IFS=$as_save_IFS
30065  test -z "$as_dir" && as_dir=.
30066    for ac_exec_ext in '' $ac_executable_extensions; do
30067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30068    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30070    break 2
30071  fi
30072done
30073  done
30074IFS=$as_save_IFS
30075
30076  ;;
30077esac
30078fi
30079CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30080if test -n "$CYGWIN_LINK"; then
30081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30082$as_echo "$CYGWIN_LINK" >&6; }
30083else
30084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30085$as_echo "no" >&6; }
30086fi
30087
30088
30089  if test "x$CYGWIN_LINK" != x; then
30090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30091$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30092    "$CYGWIN_LINK" --version > /dev/null
30093    if test $? -eq 0 ; then
30094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30095$as_echo "yes" >&6; }
30096    else
30097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30098$as_echo "no" >&6; }
30099      # This might be the VS linker. Don't exclude it later on.
30100      CYGWIN_LINK=""
30101    fi
30102  fi
30103
30104  # First-hand choice is to locate and run the vsvars bat file.
30105
30106
30107# Check whether --with-toolchain-version was given.
30108if test "${with_toolchain_version+set}" = set; then :
30109  withval=$with_toolchain_version;
30110fi
30111
30112
30113  if test "x$with_toolchain_version" = xlist; then
30114    # List all toolchains
30115    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30116$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30117    for version in $VALID_VS_VERSIONS; do
30118      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30119      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30120    done
30121
30122    exit 0
30123  elif test "x$DEVKIT_VS_VERSION" != x; then
30124    VS_VERSION=$DEVKIT_VS_VERSION
30125    TOOLCHAIN_VERSION=$VS_VERSION
30126    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30127    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30128    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30129    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30130    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30131    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30132
30133    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30134    # can still be exported as INCLUDE for compiler invocations without
30135    # SYSROOT_CFLAGS
30136    OLDIFS="$IFS"
30137    IFS=";"
30138    for i in $DEVKIT_VS_INCLUDE; do
30139      ipath=$i
30140
30141  unix_path="$ipath"
30142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30143    windows_path=`$CYGPATH -m "$unix_path"`
30144    ipath="$windows_path"
30145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30146    windows_path=`cmd //c echo $unix_path`
30147    ipath="$windows_path"
30148  fi
30149
30150      VS_INCLUDE="$VS_INCLUDE;$ipath"
30151    done
30152    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30153    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30154    for i in $DEVKIT_VS_LIB; do
30155      libpath=$i
30156
30157  unix_path="$libpath"
30158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30159    windows_path=`$CYGPATH -m "$unix_path"`
30160    libpath="$windows_path"
30161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30162    windows_path=`cmd //c echo $unix_path`
30163    libpath="$windows_path"
30164  fi
30165
30166      VS_LIB="$VS_LIB;$libpath"
30167    done
30168    IFS="$OLDIFS"
30169
30170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30171$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30172
30173  elif test "x$with_toolchain_version" != x; then
30174    # User override; check that it is valid
30175    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30176      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30177$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30178      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30179$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30180      as_fn_error $? "Cannot continue." "$LINENO" 5
30181    fi
30182    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30183  else
30184    # No flag given, use default
30185    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30186  fi
30187
30188  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30189
30190  VS_VERSION="$VS_VERSION"
30191  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30192  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30193  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30194  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30195
30196  # When using --with-tools-dir, assume it points to the correct and default
30197  # version of Visual Studio or that --with-toolchain-version was also set.
30198  if test "x$with_tools_dir" != x; then
30199
30200  if test "x$VS_ENV_CMD" = x; then
30201    VS_VERSION="${VS_VERSION}"
30202    VS_BASE="$with_tools_dir/../.."
30203    METHOD="--with-tools-dir"
30204
30205    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30206      VCVARSFILE="vc/bin/vcvars32.bat"
30207    else
30208      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30209    fi
30210
30211
30212  windows_path="$VS_BASE"
30213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30214    unix_path=`$CYGPATH -u "$windows_path"`
30215    VS_BASE="$unix_path"
30216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30218    VS_BASE="$unix_path"
30219  fi
30220
30221    if test -d "$VS_BASE"; then
30222      if test -f "$VS_BASE/$VCVARSFILE"; then
30223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30224$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30225        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30226        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30227        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30228        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30229      else
30230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30231$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30233$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30234      fi
30235    fi
30236  fi
30237
30238
30239  if test "x$VS_ENV_CMD" = x; then
30240    VS_VERSION="${VS_VERSION}"
30241    VS_BASE="$with_tools_dir/../../.."
30242    METHOD="--with-tools-dir"
30243
30244    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30245      VCVARSFILE="vc/bin/vcvars32.bat"
30246    else
30247      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30248    fi
30249
30250
30251  windows_path="$VS_BASE"
30252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30253    unix_path=`$CYGPATH -u "$windows_path"`
30254    VS_BASE="$unix_path"
30255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30257    VS_BASE="$unix_path"
30258  fi
30259
30260    if test -d "$VS_BASE"; then
30261      if test -f "$VS_BASE/$VCVARSFILE"; then
30262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30263$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30264        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30265        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30266        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30267        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30268      else
30269        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30270$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30271        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30272$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30273      fi
30274    fi
30275  fi
30276
30277    if test "x$VS_ENV_CMD" = x; then
30278      # Having specified an argument which is incorrect will produce an instant failure;
30279      # we should not go on looking
30280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30281$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30282      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30283$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30284      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30285$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30286      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30287    fi
30288  fi
30289
30290  VS_ENV_CMD=""
30291  VS_ENV_ARGS=""
30292
30293  if test "x$VS_COMNTOOLS" != x; then
30294
30295  if test "x$VS_ENV_CMD" = x; then
30296    VS_VERSION="${VS_VERSION}"
30297    VS_BASE="$VS_COMNTOOLS/../.."
30298    METHOD="$VS_COMNTOOLS_VAR variable"
30299
30300    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30301      VCVARSFILE="vc/bin/vcvars32.bat"
30302    else
30303      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30304    fi
30305
30306
30307  windows_path="$VS_BASE"
30308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30309    unix_path=`$CYGPATH -u "$windows_path"`
30310    VS_BASE="$unix_path"
30311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30313    VS_BASE="$unix_path"
30314  fi
30315
30316    if test -d "$VS_BASE"; then
30317      if test -f "$VS_BASE/$VCVARSFILE"; then
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30319$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30320        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30321        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30322        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30323        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30324      else
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30326$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30328$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30329      fi
30330    fi
30331  fi
30332
30333  fi
30334  if test "x$PROGRAMFILES" != x; then
30335
30336  if test "x$VS_ENV_CMD" = x; then
30337    VS_VERSION="${VS_VERSION}"
30338    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30339    METHOD="well-known name"
30340
30341    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30342      VCVARSFILE="vc/bin/vcvars32.bat"
30343    else
30344      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30345    fi
30346
30347
30348  windows_path="$VS_BASE"
30349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30350    unix_path=`$CYGPATH -u "$windows_path"`
30351    VS_BASE="$unix_path"
30352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30354    VS_BASE="$unix_path"
30355  fi
30356
30357    if test -d "$VS_BASE"; then
30358      if test -f "$VS_BASE/$VCVARSFILE"; then
30359        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30360$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30361        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30362        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30363        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30364        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30365      else
30366        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30367$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30368        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30369$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30370      fi
30371    fi
30372  fi
30373
30374  fi
30375  # Work around the insanely named ProgramFiles(x86) env variable
30376  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30377  if test "x$PROGRAMFILES_X86" != x; then
30378
30379  if test "x$VS_ENV_CMD" = x; then
30380    VS_VERSION="${VS_VERSION}"
30381    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30382    METHOD="well-known name"
30383
30384    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30385      VCVARSFILE="vc/bin/vcvars32.bat"
30386    else
30387      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30388    fi
30389
30390
30391  windows_path="$VS_BASE"
30392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30393    unix_path=`$CYGPATH -u "$windows_path"`
30394    VS_BASE="$unix_path"
30395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30397    VS_BASE="$unix_path"
30398  fi
30399
30400    if test -d "$VS_BASE"; then
30401      if test -f "$VS_BASE/$VCVARSFILE"; then
30402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30403$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30404        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30405        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30406        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30407        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30408      else
30409        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30410$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30411        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30412$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30413      fi
30414    fi
30415  fi
30416
30417  fi
30418
30419  if test "x$VS_ENV_CMD" = x; then
30420    VS_VERSION="${VS_VERSION}"
30421    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30422    METHOD="well-known name"
30423
30424    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30425      VCVARSFILE="vc/bin/vcvars32.bat"
30426    else
30427      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30428    fi
30429
30430
30431  windows_path="$VS_BASE"
30432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30433    unix_path=`$CYGPATH -u "$windows_path"`
30434    VS_BASE="$unix_path"
30435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30437    VS_BASE="$unix_path"
30438  fi
30439
30440    if test -d "$VS_BASE"; then
30441      if test -f "$VS_BASE/$VCVARSFILE"; then
30442        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30443$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30444        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30445        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30446        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30447        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30448      else
30449        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30450$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30451        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30452$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30453      fi
30454    fi
30455  fi
30456
30457
30458  if test "x$VS_ENV_CMD" = x; then
30459    VS_VERSION="${VS_VERSION}"
30460    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30461    METHOD="well-known name"
30462
30463    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30464      VCVARSFILE="vc/bin/vcvars32.bat"
30465    else
30466      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30467    fi
30468
30469
30470  windows_path="$VS_BASE"
30471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30472    unix_path=`$CYGPATH -u "$windows_path"`
30473    VS_BASE="$unix_path"
30474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30476    VS_BASE="$unix_path"
30477  fi
30478
30479    if test -d "$VS_BASE"; then
30480      if test -f "$VS_BASE/$VCVARSFILE"; then
30481        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30482$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30483        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30484        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30485        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30486        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30487      else
30488        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30489$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30490        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30491$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30492      fi
30493    fi
30494  fi
30495
30496
30497  if test "x$SDK_INSTALL_DIR" != x; then
30498    if test "x$ProgramW6432" != x; then
30499
30500  if test "x$VS_ENV_CMD" = x; then
30501    VS_VERSION="${VS_VERSION}"
30502    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30503    METHOD="well-known name"
30504
30505  windows_path="$WIN_SDK_BASE"
30506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30507    unix_path=`$CYGPATH -u "$windows_path"`
30508    WIN_SDK_BASE="$unix_path"
30509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30511    WIN_SDK_BASE="$unix_path"
30512  fi
30513
30514    if test -d "$WIN_SDK_BASE"; then
30515      # There have been cases of partial or broken SDK installations. A missing
30516      # lib dir is not going to work.
30517      if test ! -d "$WIN_SDK_BASE/lib"; then
30518        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30519$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30520        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30521$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30522      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30523        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30524$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30525        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30526        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30527          VS_ENV_ARGS="/x86"
30528        else
30529          VS_ENV_ARGS="/x64"
30530        fi
30531        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30532        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30533        # TODO: improve detection for other versions of SDK
30534        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30535      else
30536        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30537$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30538        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30539$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30540      fi
30541    fi
30542  fi
30543
30544    fi
30545    if test "x$PROGRAMW6432" != x; then
30546
30547  if test "x$VS_ENV_CMD" = x; then
30548    VS_VERSION="${VS_VERSION}"
30549    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30550    METHOD="well-known name"
30551
30552  windows_path="$WIN_SDK_BASE"
30553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30554    unix_path=`$CYGPATH -u "$windows_path"`
30555    WIN_SDK_BASE="$unix_path"
30556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30558    WIN_SDK_BASE="$unix_path"
30559  fi
30560
30561    if test -d "$WIN_SDK_BASE"; then
30562      # There have been cases of partial or broken SDK installations. A missing
30563      # lib dir is not going to work.
30564      if test ! -d "$WIN_SDK_BASE/lib"; then
30565        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30566$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30567        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30568$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30569      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30570        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30571$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30572        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30573        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30574          VS_ENV_ARGS="/x86"
30575        else
30576          VS_ENV_ARGS="/x64"
30577        fi
30578        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30579        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30580        # TODO: improve detection for other versions of SDK
30581        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30582      else
30583        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30584$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30585        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30586$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30587      fi
30588    fi
30589  fi
30590
30591    fi
30592    if test "x$PROGRAMFILES" != x; then
30593
30594  if test "x$VS_ENV_CMD" = x; then
30595    VS_VERSION="${VS_VERSION}"
30596    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30597    METHOD="well-known name"
30598
30599  windows_path="$WIN_SDK_BASE"
30600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30601    unix_path=`$CYGPATH -u "$windows_path"`
30602    WIN_SDK_BASE="$unix_path"
30603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30605    WIN_SDK_BASE="$unix_path"
30606  fi
30607
30608    if test -d "$WIN_SDK_BASE"; then
30609      # There have been cases of partial or broken SDK installations. A missing
30610      # lib dir is not going to work.
30611      if test ! -d "$WIN_SDK_BASE/lib"; then
30612        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30613$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30614        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30615$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30616      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30617        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30618$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30619        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30620        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30621          VS_ENV_ARGS="/x86"
30622        else
30623          VS_ENV_ARGS="/x64"
30624        fi
30625        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30626        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30627        # TODO: improve detection for other versions of SDK
30628        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30629      else
30630        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30631$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30632        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30633$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30634      fi
30635    fi
30636  fi
30637
30638    fi
30639
30640  if test "x$VS_ENV_CMD" = x; then
30641    VS_VERSION="${VS_VERSION}"
30642    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30643    METHOD="well-known name"
30644
30645  windows_path="$WIN_SDK_BASE"
30646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30647    unix_path=`$CYGPATH -u "$windows_path"`
30648    WIN_SDK_BASE="$unix_path"
30649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30651    WIN_SDK_BASE="$unix_path"
30652  fi
30653
30654    if test -d "$WIN_SDK_BASE"; then
30655      # There have been cases of partial or broken SDK installations. A missing
30656      # lib dir is not going to work.
30657      if test ! -d "$WIN_SDK_BASE/lib"; then
30658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30659$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30660        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30661$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30662      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30665        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30666        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30667          VS_ENV_ARGS="/x86"
30668        else
30669          VS_ENV_ARGS="/x64"
30670        fi
30671        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30672        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30673        # TODO: improve detection for other versions of SDK
30674        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30675      else
30676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30677$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30678        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30679$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30680      fi
30681    fi
30682  fi
30683
30684
30685  if test "x$VS_ENV_CMD" = x; then
30686    VS_VERSION="${VS_VERSION}"
30687    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30688    METHOD="well-known name"
30689
30690  windows_path="$WIN_SDK_BASE"
30691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30692    unix_path=`$CYGPATH -u "$windows_path"`
30693    WIN_SDK_BASE="$unix_path"
30694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30696    WIN_SDK_BASE="$unix_path"
30697  fi
30698
30699    if test -d "$WIN_SDK_BASE"; then
30700      # There have been cases of partial or broken SDK installations. A missing
30701      # lib dir is not going to work.
30702      if test ! -d "$WIN_SDK_BASE/lib"; then
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30706$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30707      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30709$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30710        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30711        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30712          VS_ENV_ARGS="/x86"
30713        else
30714          VS_ENV_ARGS="/x64"
30715        fi
30716        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30717        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30718        # TODO: improve detection for other versions of SDK
30719        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30720      else
30721        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30722$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30723        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30724$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30725      fi
30726    fi
30727  fi
30728
30729  fi
30730
30731    if test "x$VS_ENV_CMD" != x; then
30732      TOOLCHAIN_VERSION=$VS_VERSION
30733      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30734      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30735      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30736      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30737      # The rest of the variables are already evaled while probing
30738      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30739$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30740      break
30741    fi
30742  done
30743
30744
30745  # If we have a devkit, skip all of the below.
30746  if test "x$DEVKIT_VS_VERSION" = x; then
30747    if test "x$VS_ENV_CMD" != x; then
30748      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30749
30750  # Only process if variable expands to non-empty
30751
30752  if test "x$VS_ENV_CMD" != x; then
30753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30754
30755  # First separate the path from the arguments. This will split at the first
30756  # space.
30757  complete="$VS_ENV_CMD"
30758  path="${complete%% *}"
30759  tmp="$complete EOL"
30760  arguments="${tmp#* }"
30761
30762  # Input might be given as Windows format, start by converting to
30763  # unix format.
30764  new_path=`$CYGPATH -u "$path"`
30765
30766  # Now try to locate executable using which
30767  new_path=`$WHICH "$new_path" 2> /dev/null`
30768  # bat and cmd files are not always considered executable in cygwin causing which
30769  # to not find them
30770  if test "x$new_path" = x \
30771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30773    new_path=`$CYGPATH -u "$path"`
30774  fi
30775  if test "x$new_path" = x; then
30776    # Oops. Which didn't find the executable.
30777    # The splitting of arguments from the executable at a space might have been incorrect,
30778    # since paths with space are more likely in Windows. Give it another try with the whole
30779    # argument.
30780    path="$complete"
30781    arguments="EOL"
30782    new_path=`$CYGPATH -u "$path"`
30783    new_path=`$WHICH "$new_path" 2> /dev/null`
30784    # bat and cmd files are not always considered executable in cygwin causing which
30785    # to not find them
30786    if test "x$new_path" = x \
30787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30789      new_path=`$CYGPATH -u "$path"`
30790    fi
30791    if test "x$new_path" = x; then
30792      # It's still not found. Now this is an unrecoverable error.
30793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30794$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30795      has_space=`$ECHO "$complete" | $GREP " "`
30796      if test "x$has_space" != x; then
30797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30799      fi
30800      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30801    fi
30802  fi
30803
30804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30807  # "foo.exe" is OK but "foo" is an error.
30808  #
30809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30810  # It is also a way to make sure we got the proper file name for the real test later on.
30811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30812  if test "x$test_shortpath" = x; then
30813    # Short path failed, file does not exist as specified.
30814    # Try adding .exe or .cmd
30815    if test -f "${new_path}.exe"; then
30816      input_to_shortpath="${new_path}.exe"
30817    elif test -f "${new_path}.cmd"; then
30818      input_to_shortpath="${new_path}.cmd"
30819    else
30820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30821$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30824      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30825    fi
30826  else
30827    input_to_shortpath="$new_path"
30828  fi
30829
30830  # Call helper function which possibly converts this using DOS-style short mode.
30831  # If so, the updated path is stored in $new_path.
30832  new_path="$input_to_shortpath"
30833
30834  input_path="$input_to_shortpath"
30835  # Check if we need to convert this using DOS-style short mode. If the path
30836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30837  # take no chances and rewrite it.
30838  # Note: m4 eats our [], so we need to use [ and ] instead.
30839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30840  if test "x$has_forbidden_chars" != x; then
30841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30845      # Going to short mode and back again did indeed matter. Since short mode is
30846      # case insensitive, let's make it lowercase to improve readability.
30847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30848      # Now convert it back to Unix-style (cygpath)
30849      input_path=`$CYGPATH -u "$shortmode_path"`
30850      new_path="$input_path"
30851    fi
30852  fi
30853
30854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30855  if test "x$test_cygdrive_prefix" = x; then
30856    # As a simple fix, exclude /usr/bin since it's not a real path.
30857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30859      # a path prefixed by /cygdrive for fixpath to work.
30860      new_path="$CYGWIN_ROOT_PATH$input_path"
30861    fi
30862  fi
30863
30864  # remove trailing .exe if any
30865  new_path="${new_path/%.exe/}"
30866
30867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30868
30869  # First separate the path from the arguments. This will split at the first
30870  # space.
30871  complete="$VS_ENV_CMD"
30872  path="${complete%% *}"
30873  tmp="$complete EOL"
30874  arguments="${tmp#* }"
30875
30876  # Input might be given as Windows format, start by converting to
30877  # unix format.
30878  new_path="$path"
30879
30880  windows_path="$new_path"
30881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30882    unix_path=`$CYGPATH -u "$windows_path"`
30883    new_path="$unix_path"
30884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30886    new_path="$unix_path"
30887  fi
30888
30889
30890  # Now try to locate executable using which
30891  new_path=`$WHICH "$new_path" 2> /dev/null`
30892
30893  if test "x$new_path" = x; then
30894    # Oops. Which didn't find the executable.
30895    # The splitting of arguments from the executable at a space might have been incorrect,
30896    # since paths with space are more likely in Windows. Give it another try with the whole
30897    # argument.
30898    path="$complete"
30899    arguments="EOL"
30900    new_path="$path"
30901
30902  windows_path="$new_path"
30903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30904    unix_path=`$CYGPATH -u "$windows_path"`
30905    new_path="$unix_path"
30906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30908    new_path="$unix_path"
30909  fi
30910
30911
30912    new_path=`$WHICH "$new_path" 2> /dev/null`
30913    # bat and cmd files are not always considered executable in MSYS causing which
30914    # to not find them
30915    if test "x$new_path" = x \
30916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30918      new_path="$path"
30919
30920  windows_path="$new_path"
30921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30922    unix_path=`$CYGPATH -u "$windows_path"`
30923    new_path="$unix_path"
30924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30926    new_path="$unix_path"
30927  fi
30928
30929    fi
30930
30931    if test "x$new_path" = x; then
30932      # It's still not found. Now this is an unrecoverable error.
30933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30934$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30935      has_space=`$ECHO "$complete" | $GREP " "`
30936      if test "x$has_space" != x; then
30937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30939      fi
30940      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30941    fi
30942  fi
30943
30944  # Now new_path has a complete unix path to the binary
30945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30946    # Keep paths in /bin as-is, but remove trailing .exe if any
30947    new_path="${new_path/%.exe/}"
30948    # Do not save /bin paths to all_fixpath_prefixes!
30949  else
30950    # Not in mixed or Windows style, start by that.
30951    new_path=`cmd //c echo $new_path`
30952
30953  input_path="$new_path"
30954  # Check if we need to convert this using DOS-style short mode. If the path
30955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30956  # take no chances and rewrite it.
30957  # Note: m4 eats our [], so we need to use [ and ] instead.
30958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30959  if test "x$has_forbidden_chars" != x; then
30960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30962  fi
30963
30964    # Output is in $new_path
30965
30966  windows_path="$new_path"
30967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30968    unix_path=`$CYGPATH -u "$windows_path"`
30969    new_path="$unix_path"
30970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30972    new_path="$unix_path"
30973  fi
30974
30975    # remove trailing .exe if any
30976    new_path="${new_path/%.exe/}"
30977
30978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30980  fi
30981
30982    else
30983      # We're on a unix platform. Hooray! :)
30984      # First separate the path from the arguments. This will split at the first
30985      # space.
30986      complete="$VS_ENV_CMD"
30987      path="${complete%% *}"
30988      tmp="$complete EOL"
30989      arguments="${tmp#* }"
30990
30991      # Cannot rely on the command "which" here since it doesn't always work.
30992      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30993      if test -z "$is_absolute_path"; then
30994        # Path to executable is not absolute. Find it.
30995        IFS_save="$IFS"
30996        IFS=:
30997        for p in $PATH; do
30998          if test -f "$p/$path" && test -x "$p/$path"; then
30999            new_path="$p/$path"
31000            break
31001          fi
31002        done
31003        IFS="$IFS_save"
31004      else
31005        # This is an absolute path, we can use it without further modifications.
31006        new_path="$path"
31007      fi
31008
31009      if test "x$new_path" = x; then
31010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31011$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31012        has_space=`$ECHO "$complete" | $GREP " "`
31013        if test "x$has_space" != x; then
31014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31016        fi
31017        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31018      fi
31019    fi
31020
31021    # Now join together the path and the arguments once again
31022    if test "x$arguments" != xEOL; then
31023      new_complete="$new_path ${arguments% *}"
31024    else
31025      new_complete="$new_path"
31026    fi
31027
31028    if test "x$complete" != "x$new_complete"; then
31029      VS_ENV_CMD="$new_complete"
31030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
31031$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
31032    fi
31033  fi
31034
31035
31036      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
31037      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
31038$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
31039
31040      # We need to create a couple of temporary files.
31041      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
31042      $MKDIR -p $VS_ENV_TMP_DIR
31043
31044      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
31045      # Instead create a shell script which will set the relevant variables when run.
31046      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
31047
31048  unix_path="$WINPATH_VS_ENV_CMD"
31049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31050    windows_path=`$CYGPATH -m "$unix_path"`
31051    WINPATH_VS_ENV_CMD="$windows_path"
31052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31053    windows_path=`cmd //c echo $unix_path`
31054    WINPATH_VS_ENV_CMD="$windows_path"
31055  fi
31056
31057      WINPATH_BASH="$BASH"
31058
31059  unix_path="$WINPATH_BASH"
31060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31061    windows_path=`$CYGPATH -m "$unix_path"`
31062    WINPATH_BASH="$windows_path"
31063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31064    windows_path=`cmd //c echo $unix_path`
31065    WINPATH_BASH="$windows_path"
31066  fi
31067
31068
31069      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31070      # script (executable by bash) that will setup the important variables.
31071      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31072      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31073      # This will end up something like:
31074      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31075      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31076      # These will end up something like:
31077      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31078      # The trailing space for everyone except PATH is no typo, but is needed due
31079      # to trailing \ in the Windows paths. These will be stripped later.
31080      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31081          >> $EXTRACT_VC_ENV_BAT_FILE
31082      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31083          >> $EXTRACT_VC_ENV_BAT_FILE
31084      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31085          >> $EXTRACT_VC_ENV_BAT_FILE
31086      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31087          >> $EXTRACT_VC_ENV_BAT_FILE
31088      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31089          >> $EXTRACT_VC_ENV_BAT_FILE
31090      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31091          >> $EXTRACT_VC_ENV_BAT_FILE
31092
31093      # Now execute the newly created bat file.
31094      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31095      # Change directory so we don't need to mess with Windows paths in redirects.
31096      cd $VS_ENV_TMP_DIR
31097      cmd /c extract-vs-env.bat | $CAT
31098      cd $CURDIR
31099
31100      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31101        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31102$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31103        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31104$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31105        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31106$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31107        as_fn_error $? "Cannot continue" "$LINENO" 5
31108      fi
31109
31110      # Now set all paths and other env variables. This will allow the rest of
31111      # the configure script to find and run the compiler in the proper way.
31112      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31113$as_echo "$as_me: Setting extracted environment variables" >&6;}
31114      . $VS_ENV_TMP_DIR/set-vs-env.sh
31115      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31116      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31117    else
31118      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31120$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31121    fi
31122  fi
31123
31124  # At this point, we should have correct variables in the environment, or we can't continue.
31125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31126$as_echo_n "checking for Visual Studio variables... " >&6; }
31127
31128  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31129      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31130    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31132$as_echo "present but broken" >&6; }
31133      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31134    else
31135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31136$as_echo "ok" >&6; }
31137      # Remove any trailing "\" ";" and " " from the variables.
31138      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31139      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31140      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31141      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31142      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31143      # Remove any paths containing # (typically F#) as that messes up make. This
31144      # is needed if visual studio was installed with F# support.
31145      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31146
31147
31148
31149
31150
31151      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31152      OLDIFS="$IFS"
31153      IFS=";"
31154      for i in $VS_INCLUDE; do
31155        ipath=$i
31156        # Only process non-empty elements
31157        if test "x$ipath" != x; then
31158          IFS="$OLDIFS"
31159          # Check that directory exists before calling fixup_path
31160          testpath=$ipath
31161
31162  windows_path="$testpath"
31163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31164    unix_path=`$CYGPATH -u "$windows_path"`
31165    testpath="$unix_path"
31166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31168    testpath="$unix_path"
31169  fi
31170
31171          if test -d "$testpath"; then
31172
31173  # Only process if variable expands to non-empty
31174
31175  if test "x$ipath" != x; then
31176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31177
31178  # Input might be given as Windows format, start by converting to
31179  # unix format.
31180  path="$ipath"
31181  new_path=`$CYGPATH -u "$path"`
31182
31183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31186  # "foo.exe" is OK but "foo" is an error.
31187  #
31188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31189  # It is also a way to make sure we got the proper file name for the real test later on.
31190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31191  if test "x$test_shortpath" = x; then
31192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31193$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31194    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31195  fi
31196
31197  # Call helper function which possibly converts this using DOS-style short mode.
31198  # If so, the updated path is stored in $new_path.
31199
31200  input_path="$new_path"
31201  # Check if we need to convert this using DOS-style short mode. If the path
31202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31203  # take no chances and rewrite it.
31204  # Note: m4 eats our [], so we need to use [ and ] instead.
31205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31206  if test "x$has_forbidden_chars" != x; then
31207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31211      # Going to short mode and back again did indeed matter. Since short mode is
31212      # case insensitive, let's make it lowercase to improve readability.
31213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31214      # Now convert it back to Unix-style (cygpath)
31215      input_path=`$CYGPATH -u "$shortmode_path"`
31216      new_path="$input_path"
31217    fi
31218  fi
31219
31220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31221  if test "x$test_cygdrive_prefix" = x; then
31222    # As a simple fix, exclude /usr/bin since it's not a real path.
31223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31225      # a path prefixed by /cygdrive for fixpath to work.
31226      new_path="$CYGWIN_ROOT_PATH$input_path"
31227    fi
31228  fi
31229
31230
31231  if test "x$path" != "x$new_path"; then
31232    ipath="$new_path"
31233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31234$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31235  fi
31236
31237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31238
31239  path="$ipath"
31240  has_colon=`$ECHO $path | $GREP ^.:`
31241  new_path="$path"
31242  if test "x$has_colon" = x; then
31243    # Not in mixed or Windows style, start by that.
31244    new_path=`cmd //c echo $path`
31245  fi
31246
31247
31248  input_path="$new_path"
31249  # Check if we need to convert this using DOS-style short mode. If the path
31250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31251  # take no chances and rewrite it.
31252  # Note: m4 eats our [], so we need to use [ and ] instead.
31253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31254  if test "x$has_forbidden_chars" != x; then
31255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31257  fi
31258
31259
31260  windows_path="$new_path"
31261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31262    unix_path=`$CYGPATH -u "$windows_path"`
31263    new_path="$unix_path"
31264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31266    new_path="$unix_path"
31267  fi
31268
31269  if test "x$path" != "x$new_path"; then
31270    ipath="$new_path"
31271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31272$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31273  fi
31274
31275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31277
31278    else
31279      # We're on a unix platform. Hooray! :)
31280      path="$ipath"
31281      has_space=`$ECHO "$path" | $GREP " "`
31282      if test "x$has_space" != x; then
31283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31284$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31286      fi
31287
31288      # Use eval to expand a potential ~
31289      eval path="$path"
31290      if test ! -f "$path" && test ! -d "$path"; then
31291        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31292      fi
31293
31294      if test -d "$path"; then
31295        ipath="`cd "$path"; $THEPWDCMD -L`"
31296      else
31297        dir="`$DIRNAME "$path"`"
31298        base="`$BASENAME "$path"`"
31299        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31300      fi
31301    fi
31302  fi
31303
31304            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31305          fi
31306          IFS=";"
31307        fi
31308      done
31309      # Convert VS_LIB into SYSROOT_LDFLAGS
31310      for i in $VS_LIB; do
31311        libpath=$i
31312        # Only process non-empty elements
31313        if test "x$libpath" != x; then
31314          IFS="$OLDIFS"
31315          # Check that directory exists before calling fixup_path
31316          testpath=$libpath
31317
31318  windows_path="$testpath"
31319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31320    unix_path=`$CYGPATH -u "$windows_path"`
31321    testpath="$unix_path"
31322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31324    testpath="$unix_path"
31325  fi
31326
31327          if test -d "$testpath"; then
31328
31329  # Only process if variable expands to non-empty
31330
31331  if test "x$libpath" != x; then
31332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31333
31334  # Input might be given as Windows format, start by converting to
31335  # unix format.
31336  path="$libpath"
31337  new_path=`$CYGPATH -u "$path"`
31338
31339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31342  # "foo.exe" is OK but "foo" is an error.
31343  #
31344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31345  # It is also a way to make sure we got the proper file name for the real test later on.
31346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31347  if test "x$test_shortpath" = x; then
31348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31349$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31350    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31351  fi
31352
31353  # Call helper function which possibly converts this using DOS-style short mode.
31354  # If so, the updated path is stored in $new_path.
31355
31356  input_path="$new_path"
31357  # Check if we need to convert this using DOS-style short mode. If the path
31358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31359  # take no chances and rewrite it.
31360  # Note: m4 eats our [], so we need to use [ and ] instead.
31361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31362  if test "x$has_forbidden_chars" != x; then
31363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31367      # Going to short mode and back again did indeed matter. Since short mode is
31368      # case insensitive, let's make it lowercase to improve readability.
31369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31370      # Now convert it back to Unix-style (cygpath)
31371      input_path=`$CYGPATH -u "$shortmode_path"`
31372      new_path="$input_path"
31373    fi
31374  fi
31375
31376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31377  if test "x$test_cygdrive_prefix" = x; then
31378    # As a simple fix, exclude /usr/bin since it's not a real path.
31379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31381      # a path prefixed by /cygdrive for fixpath to work.
31382      new_path="$CYGWIN_ROOT_PATH$input_path"
31383    fi
31384  fi
31385
31386
31387  if test "x$path" != "x$new_path"; then
31388    libpath="$new_path"
31389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31390$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31391  fi
31392
31393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31394
31395  path="$libpath"
31396  has_colon=`$ECHO $path | $GREP ^.:`
31397  new_path="$path"
31398  if test "x$has_colon" = x; then
31399    # Not in mixed or Windows style, start by that.
31400    new_path=`cmd //c echo $path`
31401  fi
31402
31403
31404  input_path="$new_path"
31405  # Check if we need to convert this using DOS-style short mode. If the path
31406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31407  # take no chances and rewrite it.
31408  # Note: m4 eats our [], so we need to use [ and ] instead.
31409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31410  if test "x$has_forbidden_chars" != x; then
31411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31413  fi
31414
31415
31416  windows_path="$new_path"
31417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31418    unix_path=`$CYGPATH -u "$windows_path"`
31419    new_path="$unix_path"
31420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31422    new_path="$unix_path"
31423  fi
31424
31425  if test "x$path" != "x$new_path"; then
31426    libpath="$new_path"
31427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31428$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31429  fi
31430
31431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31433
31434    else
31435      # We're on a unix platform. Hooray! :)
31436      path="$libpath"
31437      has_space=`$ECHO "$path" | $GREP " "`
31438      if test "x$has_space" != x; then
31439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31440$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31442      fi
31443
31444      # Use eval to expand a potential ~
31445      eval path="$path"
31446      if test ! -f "$path" && test ! -d "$path"; then
31447        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31448      fi
31449
31450      if test -d "$path"; then
31451        libpath="`cd "$path"; $THEPWDCMD -L`"
31452      else
31453        dir="`$DIRNAME "$path"`"
31454        base="`$BASENAME "$path"`"
31455        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31456      fi
31457    fi
31458  fi
31459
31460            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31461          fi
31462          IFS=";"
31463        fi
31464      done
31465      IFS="$OLDIFS"
31466    fi
31467  else
31468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31469$as_echo "not found" >&6; }
31470
31471    if test "x$VS_ENV_CMD" = x; then
31472      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31473$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31474      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31475$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31476    else
31477      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31478$as_echo "$as_me: Running the extraction script failed." >&6;}
31479    fi
31480    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31481$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31482    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31483$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31484    as_fn_error $? "Cannot continue" "$LINENO" 5
31485  fi
31486
31487    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31488    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31489    PATH="$VS_PATH"
31490    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31491    export INCLUDE="$VS_INCLUDE"
31492    export LIB="$VS_LIB"
31493  else
31494    # Currently we do not define this for other toolchains. This might change as the need arise.
31495    TOOLCHAIN_VERSION=
31496  fi
31497
31498
31499  # For solaris we really need solaris tools, and not the GNU equivalent.
31500  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31501  # so add that to path before starting to probe.
31502  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31503  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31504    PATH="/usr/ccs/bin:$PATH"
31505  fi
31506
31507  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31508  # override all other locations.
31509  if test "x$TOOLCHAIN_PATH" != x; then
31510    PATH=$TOOLCHAIN_PATH:$PATH
31511  fi
31512
31513
31514  #
31515  # Setup the compilers (CC and CXX)
31516  #
31517
31518  COMPILER_NAME=C
31519  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31520
31521  if test "x$CC" != x; then
31522    # User has supplied compiler name already, always let that override.
31523    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31524$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31525    if test "x`basename $CC`" = "x$CC"; then
31526      # A command without a complete path is provided, search $PATH.
31527
31528      for ac_prog in $CC
31529do
31530  # Extract the first word of "$ac_prog", so it can be a program name with args.
31531set dummy $ac_prog; ac_word=$2
31532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31533$as_echo_n "checking for $ac_word... " >&6; }
31534if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31535  $as_echo_n "(cached) " >&6
31536else
31537  case $POTENTIAL_CC in
31538  [\\/]* | ?:[\\/]*)
31539  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31540  ;;
31541  *)
31542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31543for as_dir in $PATH
31544do
31545  IFS=$as_save_IFS
31546  test -z "$as_dir" && as_dir=.
31547    for ac_exec_ext in '' $ac_executable_extensions; do
31548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31549    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31551    break 2
31552  fi
31553done
31554  done
31555IFS=$as_save_IFS
31556
31557  ;;
31558esac
31559fi
31560POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31561if test -n "$POTENTIAL_CC"; then
31562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31563$as_echo "$POTENTIAL_CC" >&6; }
31564else
31565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31566$as_echo "no" >&6; }
31567fi
31568
31569
31570  test -n "$POTENTIAL_CC" && break
31571done
31572
31573      if test "x$POTENTIAL_CC" != x; then
31574        CC=$POTENTIAL_CC
31575      else
31576        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31577      fi
31578    else
31579      # Otherwise it might already be a complete path
31580      if test ! -x "$CC"; then
31581        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31582      fi
31583    fi
31584  else
31585    # No user supplied value. Locate compiler ourselves.
31586
31587    # If we are cross compiling, assume cross compilation tools follows the
31588    # cross compilation standard where they are prefixed with the autoconf
31589    # standard name for the target. For example the binary
31590    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31591    # If we are not cross compiling, then the default compiler name will be
31592    # used.
31593
31594    CC=
31595    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31596    # before checking the rest of the PATH.
31597    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31598    # step, this should not be necessary.
31599    if test -n "$TOOLCHAIN_PATH"; then
31600      PATH_save="$PATH"
31601      PATH="$TOOLCHAIN_PATH"
31602      for ac_prog in $SEARCH_LIST
31603do
31604  # Extract the first word of "$ac_prog", so it can be a program name with args.
31605set dummy $ac_prog; ac_word=$2
31606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31607$as_echo_n "checking for $ac_word... " >&6; }
31608if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31609  $as_echo_n "(cached) " >&6
31610else
31611  case $TOOLCHAIN_PATH_CC in
31612  [\\/]* | ?:[\\/]*)
31613  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31614  ;;
31615  *)
31616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31617for as_dir in $PATH
31618do
31619  IFS=$as_save_IFS
31620  test -z "$as_dir" && as_dir=.
31621    for ac_exec_ext in '' $ac_executable_extensions; do
31622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31623    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31625    break 2
31626  fi
31627done
31628  done
31629IFS=$as_save_IFS
31630
31631  ;;
31632esac
31633fi
31634TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31635if test -n "$TOOLCHAIN_PATH_CC"; then
31636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31637$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31638else
31639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31640$as_echo "no" >&6; }
31641fi
31642
31643
31644  test -n "$TOOLCHAIN_PATH_CC" && break
31645done
31646
31647      CC=$TOOLCHAIN_PATH_CC
31648      PATH="$PATH_save"
31649    fi
31650
31651    # AC_PATH_PROGS can't be run multiple times with the same variable,
31652    # so create a new name for this run.
31653    if test "x$CC" = x; then
31654      for ac_prog in $SEARCH_LIST
31655do
31656  # Extract the first word of "$ac_prog", so it can be a program name with args.
31657set dummy $ac_prog; ac_word=$2
31658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31659$as_echo_n "checking for $ac_word... " >&6; }
31660if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31661  $as_echo_n "(cached) " >&6
31662else
31663  case $POTENTIAL_CC in
31664  [\\/]* | ?:[\\/]*)
31665  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31666  ;;
31667  *)
31668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31669for as_dir in $PATH
31670do
31671  IFS=$as_save_IFS
31672  test -z "$as_dir" && as_dir=.
31673    for ac_exec_ext in '' $ac_executable_extensions; do
31674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31675    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31677    break 2
31678  fi
31679done
31680  done
31681IFS=$as_save_IFS
31682
31683  ;;
31684esac
31685fi
31686POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31687if test -n "$POTENTIAL_CC"; then
31688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31689$as_echo "$POTENTIAL_CC" >&6; }
31690else
31691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31692$as_echo "no" >&6; }
31693fi
31694
31695
31696  test -n "$POTENTIAL_CC" && break
31697done
31698
31699      CC=$POTENTIAL_CC
31700    fi
31701
31702    if test "x$CC" = x; then
31703
31704  # Print a helpful message on how to acquire the necessary build dependency.
31705  # devkit is the help tag: freetype, cups, alsa etc
31706  MISSING_DEPENDENCY=devkit
31707
31708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31709    cygwin_help $MISSING_DEPENDENCY
31710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31711    msys_help $MISSING_DEPENDENCY
31712  else
31713    PKGHANDLER_COMMAND=
31714
31715    case $PKGHANDLER in
31716      apt-get)
31717        apt_help     $MISSING_DEPENDENCY ;;
31718      yum)
31719        yum_help     $MISSING_DEPENDENCY ;;
31720      port)
31721        port_help    $MISSING_DEPENDENCY ;;
31722      pkgutil)
31723        pkgutil_help $MISSING_DEPENDENCY ;;
31724      pkgadd)
31725        pkgadd_help  $MISSING_DEPENDENCY ;;
31726    esac
31727
31728    if test "x$PKGHANDLER_COMMAND" != x; then
31729      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31730    fi
31731  fi
31732
31733      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31734    fi
31735  fi
31736
31737  # Now we have a compiler binary in CC. Make sure it's okay.
31738
31739  # Only process if variable expands to non-empty
31740
31741  if test "x$CC" != x; then
31742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31743
31744  # First separate the path from the arguments. This will split at the first
31745  # space.
31746  complete="$CC"
31747  path="${complete%% *}"
31748  tmp="$complete EOL"
31749  arguments="${tmp#* }"
31750
31751  # Input might be given as Windows format, start by converting to
31752  # unix format.
31753  new_path=`$CYGPATH -u "$path"`
31754
31755  # Now try to locate executable using which
31756  new_path=`$WHICH "$new_path" 2> /dev/null`
31757  # bat and cmd files are not always considered executable in cygwin causing which
31758  # to not find them
31759  if test "x$new_path" = x \
31760      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31761      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31762    new_path=`$CYGPATH -u "$path"`
31763  fi
31764  if test "x$new_path" = x; then
31765    # Oops. Which didn't find the executable.
31766    # The splitting of arguments from the executable at a space might have been incorrect,
31767    # since paths with space are more likely in Windows. Give it another try with the whole
31768    # argument.
31769    path="$complete"
31770    arguments="EOL"
31771    new_path=`$CYGPATH -u "$path"`
31772    new_path=`$WHICH "$new_path" 2> /dev/null`
31773    # bat and cmd files are not always considered executable in cygwin causing which
31774    # to not find them
31775    if test "x$new_path" = x \
31776        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31777        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31778      new_path=`$CYGPATH -u "$path"`
31779    fi
31780    if test "x$new_path" = x; then
31781      # It's still not found. Now this is an unrecoverable error.
31782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31783$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31784      has_space=`$ECHO "$complete" | $GREP " "`
31785      if test "x$has_space" != x; then
31786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31788      fi
31789      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31790    fi
31791  fi
31792
31793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31796  # "foo.exe" is OK but "foo" is an error.
31797  #
31798  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31799  # It is also a way to make sure we got the proper file name for the real test later on.
31800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31801  if test "x$test_shortpath" = x; then
31802    # Short path failed, file does not exist as specified.
31803    # Try adding .exe or .cmd
31804    if test -f "${new_path}.exe"; then
31805      input_to_shortpath="${new_path}.exe"
31806    elif test -f "${new_path}.cmd"; then
31807      input_to_shortpath="${new_path}.cmd"
31808    else
31809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31810$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31813      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31814    fi
31815  else
31816    input_to_shortpath="$new_path"
31817  fi
31818
31819  # Call helper function which possibly converts this using DOS-style short mode.
31820  # If so, the updated path is stored in $new_path.
31821  new_path="$input_to_shortpath"
31822
31823  input_path="$input_to_shortpath"
31824  # Check if we need to convert this using DOS-style short mode. If the path
31825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31826  # take no chances and rewrite it.
31827  # Note: m4 eats our [], so we need to use [ and ] instead.
31828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31829  if test "x$has_forbidden_chars" != x; then
31830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31834      # Going to short mode and back again did indeed matter. Since short mode is
31835      # case insensitive, let's make it lowercase to improve readability.
31836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31837      # Now convert it back to Unix-style (cygpath)
31838      input_path=`$CYGPATH -u "$shortmode_path"`
31839      new_path="$input_path"
31840    fi
31841  fi
31842
31843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31844  if test "x$test_cygdrive_prefix" = x; then
31845    # As a simple fix, exclude /usr/bin since it's not a real path.
31846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31848      # a path prefixed by /cygdrive for fixpath to work.
31849      new_path="$CYGWIN_ROOT_PATH$input_path"
31850    fi
31851  fi
31852
31853  # remove trailing .exe if any
31854  new_path="${new_path/%.exe/}"
31855
31856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31857
31858  # First separate the path from the arguments. This will split at the first
31859  # space.
31860  complete="$CC"
31861  path="${complete%% *}"
31862  tmp="$complete EOL"
31863  arguments="${tmp#* }"
31864
31865  # Input might be given as Windows format, start by converting to
31866  # unix format.
31867  new_path="$path"
31868
31869  windows_path="$new_path"
31870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31871    unix_path=`$CYGPATH -u "$windows_path"`
31872    new_path="$unix_path"
31873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31875    new_path="$unix_path"
31876  fi
31877
31878
31879  # Now try to locate executable using which
31880  new_path=`$WHICH "$new_path" 2> /dev/null`
31881
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="$path"
31890
31891  windows_path="$new_path"
31892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31893    unix_path=`$CYGPATH -u "$windows_path"`
31894    new_path="$unix_path"
31895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31897    new_path="$unix_path"
31898  fi
31899
31900
31901    new_path=`$WHICH "$new_path" 2> /dev/null`
31902    # bat and cmd files are not always considered executable in MSYS causing which
31903    # to not find them
31904    if test "x$new_path" = x \
31905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31907      new_path="$path"
31908
31909  windows_path="$new_path"
31910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31911    unix_path=`$CYGPATH -u "$windows_path"`
31912    new_path="$unix_path"
31913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31915    new_path="$unix_path"
31916  fi
31917
31918    fi
31919
31920    if test "x$new_path" = x; then
31921      # It's still not found. Now this is an unrecoverable error.
31922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31923$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31924      has_space=`$ECHO "$complete" | $GREP " "`
31925      if test "x$has_space" != x; then
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31928      fi
31929      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31930    fi
31931  fi
31932
31933  # Now new_path has a complete unix path to the binary
31934  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31935    # Keep paths in /bin as-is, but remove trailing .exe if any
31936    new_path="${new_path/%.exe/}"
31937    # Do not save /bin paths to all_fixpath_prefixes!
31938  else
31939    # Not in mixed or Windows style, start by that.
31940    new_path=`cmd //c echo $new_path`
31941
31942  input_path="$new_path"
31943  # Check if we need to convert this using DOS-style short mode. If the path
31944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31945  # take no chances and rewrite it.
31946  # Note: m4 eats our [], so we need to use [ and ] instead.
31947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31948  if test "x$has_forbidden_chars" != x; then
31949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31951  fi
31952
31953    # Output is in $new_path
31954
31955  windows_path="$new_path"
31956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31957    unix_path=`$CYGPATH -u "$windows_path"`
31958    new_path="$unix_path"
31959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31961    new_path="$unix_path"
31962  fi
31963
31964    # remove trailing .exe if any
31965    new_path="${new_path/%.exe/}"
31966
31967    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31968    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31969  fi
31970
31971    else
31972      # We're on a unix platform. Hooray! :)
31973      # First separate the path from the arguments. This will split at the first
31974      # space.
31975      complete="$CC"
31976      path="${complete%% *}"
31977      tmp="$complete EOL"
31978      arguments="${tmp#* }"
31979
31980      # Cannot rely on the command "which" here since it doesn't always work.
31981      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31982      if test -z "$is_absolute_path"; then
31983        # Path to executable is not absolute. Find it.
31984        IFS_save="$IFS"
31985        IFS=:
31986        for p in $PATH; do
31987          if test -f "$p/$path" && test -x "$p/$path"; then
31988            new_path="$p/$path"
31989            break
31990          fi
31991        done
31992        IFS="$IFS_save"
31993      else
31994        # This is an absolute path, we can use it without further modifications.
31995        new_path="$path"
31996      fi
31997
31998      if test "x$new_path" = x; then
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32000$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32001        has_space=`$ECHO "$complete" | $GREP " "`
32002        if test "x$has_space" != x; then
32003          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32004$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32005        fi
32006        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32007      fi
32008    fi
32009
32010    # Now join together the path and the arguments once again
32011    if test "x$arguments" != xEOL; then
32012      new_complete="$new_path ${arguments% *}"
32013    else
32014      new_complete="$new_path"
32015    fi
32016
32017    if test "x$complete" != "x$new_complete"; then
32018      CC="$new_complete"
32019      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
32020$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
32021    fi
32022  fi
32023
32024  TEST_COMPILER="$CC"
32025  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
32026  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
32027  if test "x$OPENJDK_BUILD_OS" != xaix; then
32028    # FIXME: This test should not be needed anymore; we don't do that for any platform.
32029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
32030$as_echo_n "checking resolved symbolic links for CC... " >&6; }
32031
32032  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32033    # Follow a chain of symbolic links. Use readlink
32034    # where it exists, else fall back to horribly
32035    # complicated shell code.
32036    if test "x$READLINK_TESTED" != yes; then
32037      # On MacOSX there is a readlink tool with a different
32038      # purpose than the GNU readlink tool. Check the found readlink.
32039      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32040      if test "x$ISGNU" = x; then
32041        # A readlink that we do not know how to use.
32042        # Are there other non-GNU readlinks out there?
32043        READLINK_TESTED=yes
32044        READLINK=
32045      fi
32046    fi
32047
32048    if test "x$READLINK" != x; then
32049      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
32050    else
32051      # Save the current directory for restoring afterwards
32052      STARTDIR=$PWD
32053      COUNTER=0
32054      sym_link_dir=`$DIRNAME $TEST_COMPILER`
32055      sym_link_file=`$BASENAME $TEST_COMPILER`
32056      cd $sym_link_dir
32057      # Use -P flag to resolve symlinks in directories.
32058      cd `$THEPWDCMD -P`
32059      sym_link_dir=`$THEPWDCMD -P`
32060      # Resolve file symlinks
32061      while test $COUNTER -lt 20; do
32062        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32063        if test "x$ISLINK" == x; then
32064          # This is not a symbolic link! We are done!
32065          break
32066        fi
32067        # Again resolve directory symlinks since the target of the just found
32068        # link could be in a different directory
32069        cd `$DIRNAME $ISLINK`
32070        sym_link_dir=`$THEPWDCMD -P`
32071        sym_link_file=`$BASENAME $ISLINK`
32072        let COUNTER=COUNTER+1
32073      done
32074      cd $STARTDIR
32075      TEST_COMPILER=$sym_link_dir/$sym_link_file
32076    fi
32077  fi
32078
32079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
32080$as_echo "$TEST_COMPILER" >&6; }
32081  fi
32082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
32083$as_echo_n "checking if CC is disguised ccache... " >&6; }
32084
32085  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
32086  if test "x$COMPILER_BASENAME" = "xccache"; then
32087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
32088$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
32089    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
32090    # We want to control ccache invocation ourselves, so ignore this cc and try
32091    # searching again.
32092
32093    # Remove the path to the fake ccache cc from the PATH
32094    RETRY_COMPILER_SAVED_PATH="$PATH"
32095    COMPILER_DIRNAME=`$DIRNAME $CC`
32096    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
32097
32098    # Try again looking for our compiler
32099    if test -n "$ac_tool_prefix"; then
32100  for ac_prog in $TOOLCHAIN_CC_BINARY
32101  do
32102    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32103set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32105$as_echo_n "checking for $ac_word... " >&6; }
32106if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
32107  $as_echo_n "(cached) " >&6
32108else
32109  if test -n "$PROPER_COMPILER_CC"; then
32110  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
32111else
32112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32113for as_dir in $PATH
32114do
32115  IFS=$as_save_IFS
32116  test -z "$as_dir" && as_dir=.
32117    for ac_exec_ext in '' $ac_executable_extensions; do
32118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32119    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
32120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32121    break 2
32122  fi
32123done
32124  done
32125IFS=$as_save_IFS
32126
32127fi
32128fi
32129PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
32130if test -n "$PROPER_COMPILER_CC"; then
32131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32132$as_echo "$PROPER_COMPILER_CC" >&6; }
32133else
32134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32135$as_echo "no" >&6; }
32136fi
32137
32138
32139    test -n "$PROPER_COMPILER_CC" && break
32140  done
32141fi
32142if test -z "$PROPER_COMPILER_CC"; then
32143  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
32144  for ac_prog in $TOOLCHAIN_CC_BINARY
32145do
32146  # Extract the first word of "$ac_prog", so it can be a program name with args.
32147set dummy $ac_prog; ac_word=$2
32148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32149$as_echo_n "checking for $ac_word... " >&6; }
32150if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
32151  $as_echo_n "(cached) " >&6
32152else
32153  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32154  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
32155else
32156as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32157for as_dir in $PATH
32158do
32159  IFS=$as_save_IFS
32160  test -z "$as_dir" && as_dir=.
32161    for ac_exec_ext in '' $ac_executable_extensions; do
32162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32163    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
32164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32165    break 2
32166  fi
32167done
32168  done
32169IFS=$as_save_IFS
32170
32171fi
32172fi
32173ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
32174if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
32176$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
32177else
32178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32179$as_echo "no" >&6; }
32180fi
32181
32182
32183  test -n "$ac_ct_PROPER_COMPILER_CC" && break
32184done
32185
32186  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
32187    PROPER_COMPILER_CC=""
32188  else
32189    case $cross_compiling:$ac_tool_warned in
32190yes:)
32191{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32192$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32193ac_tool_warned=yes ;;
32194esac
32195    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
32196  fi
32197fi
32198
32199
32200  # Only process if variable expands to non-empty
32201
32202  if test "x$PROPER_COMPILER_CC" != x; then
32203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32204
32205  # First separate the path from the arguments. This will split at the first
32206  # space.
32207  complete="$PROPER_COMPILER_CC"
32208  path="${complete%% *}"
32209  tmp="$complete EOL"
32210  arguments="${tmp#* }"
32211
32212  # Input might be given as Windows format, start by converting to
32213  # unix format.
32214  new_path=`$CYGPATH -u "$path"`
32215
32216  # Now try to locate executable using which
32217  new_path=`$WHICH "$new_path" 2> /dev/null`
32218  # bat and cmd files are not always considered executable in cygwin causing which
32219  # to not find them
32220  if test "x$new_path" = x \
32221      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32222      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32223    new_path=`$CYGPATH -u "$path"`
32224  fi
32225  if test "x$new_path" = x; then
32226    # Oops. Which didn't find the executable.
32227    # The splitting of arguments from the executable at a space might have been incorrect,
32228    # since paths with space are more likely in Windows. Give it another try with the whole
32229    # argument.
32230    path="$complete"
32231    arguments="EOL"
32232    new_path=`$CYGPATH -u "$path"`
32233    new_path=`$WHICH "$new_path" 2> /dev/null`
32234    # bat and cmd files are not always considered executable in cygwin causing which
32235    # to not find them
32236    if test "x$new_path" = x \
32237        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32238        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32239      new_path=`$CYGPATH -u "$path"`
32240    fi
32241    if test "x$new_path" = x; then
32242      # It's still not found. Now this is an unrecoverable error.
32243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32244$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32245      has_space=`$ECHO "$complete" | $GREP " "`
32246      if test "x$has_space" != x; then
32247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32249      fi
32250      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32251    fi
32252  fi
32253
32254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32257  # "foo.exe" is OK but "foo" is an error.
32258  #
32259  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32260  # It is also a way to make sure we got the proper file name for the real test later on.
32261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32262  if test "x$test_shortpath" = x; then
32263    # Short path failed, file does not exist as specified.
32264    # Try adding .exe or .cmd
32265    if test -f "${new_path}.exe"; then
32266      input_to_shortpath="${new_path}.exe"
32267    elif test -f "${new_path}.cmd"; then
32268      input_to_shortpath="${new_path}.cmd"
32269    else
32270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32271$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32274      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32275    fi
32276  else
32277    input_to_shortpath="$new_path"
32278  fi
32279
32280  # Call helper function which possibly converts this using DOS-style short mode.
32281  # If so, the updated path is stored in $new_path.
32282  new_path="$input_to_shortpath"
32283
32284  input_path="$input_to_shortpath"
32285  # Check if we need to convert this using DOS-style short mode. If the path
32286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32287  # take no chances and rewrite it.
32288  # Note: m4 eats our [], so we need to use [ and ] instead.
32289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32290  if test "x$has_forbidden_chars" != x; then
32291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32295      # Going to short mode and back again did indeed matter. Since short mode is
32296      # case insensitive, let's make it lowercase to improve readability.
32297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32298      # Now convert it back to Unix-style (cygpath)
32299      input_path=`$CYGPATH -u "$shortmode_path"`
32300      new_path="$input_path"
32301    fi
32302  fi
32303
32304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32305  if test "x$test_cygdrive_prefix" = x; then
32306    # As a simple fix, exclude /usr/bin since it's not a real path.
32307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32309      # a path prefixed by /cygdrive for fixpath to work.
32310      new_path="$CYGWIN_ROOT_PATH$input_path"
32311    fi
32312  fi
32313
32314  # remove trailing .exe if any
32315  new_path="${new_path/%.exe/}"
32316
32317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32318
32319  # First separate the path from the arguments. This will split at the first
32320  # space.
32321  complete="$PROPER_COMPILER_CC"
32322  path="${complete%% *}"
32323  tmp="$complete EOL"
32324  arguments="${tmp#* }"
32325
32326  # Input might be given as Windows format, start by converting to
32327  # unix format.
32328  new_path="$path"
32329
32330  windows_path="$new_path"
32331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32332    unix_path=`$CYGPATH -u "$windows_path"`
32333    new_path="$unix_path"
32334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32336    new_path="$unix_path"
32337  fi
32338
32339
32340  # Now try to locate executable using which
32341  new_path=`$WHICH "$new_path" 2> /dev/null`
32342
32343  if test "x$new_path" = x; then
32344    # Oops. Which didn't find the executable.
32345    # The splitting of arguments from the executable at a space might have been incorrect,
32346    # since paths with space are more likely in Windows. Give it another try with the whole
32347    # argument.
32348    path="$complete"
32349    arguments="EOL"
32350    new_path="$path"
32351
32352  windows_path="$new_path"
32353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32354    unix_path=`$CYGPATH -u "$windows_path"`
32355    new_path="$unix_path"
32356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32358    new_path="$unix_path"
32359  fi
32360
32361
32362    new_path=`$WHICH "$new_path" 2> /dev/null`
32363    # bat and cmd files are not always considered executable in MSYS causing which
32364    # to not find them
32365    if test "x$new_path" = x \
32366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32368      new_path="$path"
32369
32370  windows_path="$new_path"
32371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32372    unix_path=`$CYGPATH -u "$windows_path"`
32373    new_path="$unix_path"
32374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32376    new_path="$unix_path"
32377  fi
32378
32379    fi
32380
32381    if test "x$new_path" = x; then
32382      # It's still not found. Now this is an unrecoverable error.
32383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32384$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32385      has_space=`$ECHO "$complete" | $GREP " "`
32386      if test "x$has_space" != x; then
32387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32389      fi
32390      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32391    fi
32392  fi
32393
32394  # Now new_path has a complete unix path to the binary
32395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32396    # Keep paths in /bin as-is, but remove trailing .exe if any
32397    new_path="${new_path/%.exe/}"
32398    # Do not save /bin paths to all_fixpath_prefixes!
32399  else
32400    # Not in mixed or Windows style, start by that.
32401    new_path=`cmd //c echo $new_path`
32402
32403  input_path="$new_path"
32404  # Check if we need to convert this using DOS-style short mode. If the path
32405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32406  # take no chances and rewrite it.
32407  # Note: m4 eats our [], so we need to use [ and ] instead.
32408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32409  if test "x$has_forbidden_chars" != x; then
32410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32412  fi
32413
32414    # Output is in $new_path
32415
32416  windows_path="$new_path"
32417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32418    unix_path=`$CYGPATH -u "$windows_path"`
32419    new_path="$unix_path"
32420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32422    new_path="$unix_path"
32423  fi
32424
32425    # remove trailing .exe if any
32426    new_path="${new_path/%.exe/}"
32427
32428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32430  fi
32431
32432    else
32433      # We're on a unix platform. Hooray! :)
32434      # First separate the path from the arguments. This will split at the first
32435      # space.
32436      complete="$PROPER_COMPILER_CC"
32437      path="${complete%% *}"
32438      tmp="$complete EOL"
32439      arguments="${tmp#* }"
32440
32441      # Cannot rely on the command "which" here since it doesn't always work.
32442      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32443      if test -z "$is_absolute_path"; then
32444        # Path to executable is not absolute. Find it.
32445        IFS_save="$IFS"
32446        IFS=:
32447        for p in $PATH; do
32448          if test -f "$p/$path" && test -x "$p/$path"; then
32449            new_path="$p/$path"
32450            break
32451          fi
32452        done
32453        IFS="$IFS_save"
32454      else
32455        # This is an absolute path, we can use it without further modifications.
32456        new_path="$path"
32457      fi
32458
32459      if test "x$new_path" = x; then
32460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32461$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32462        has_space=`$ECHO "$complete" | $GREP " "`
32463        if test "x$has_space" != x; then
32464          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32465$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32466        fi
32467        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32468      fi
32469    fi
32470
32471    # Now join together the path and the arguments once again
32472    if test "x$arguments" != xEOL; then
32473      new_complete="$new_path ${arguments% *}"
32474    else
32475      new_complete="$new_path"
32476    fi
32477
32478    if test "x$complete" != "x$new_complete"; then
32479      PROPER_COMPILER_CC="$new_complete"
32480      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32481$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32482    fi
32483  fi
32484
32485    PATH="$RETRY_COMPILER_SAVED_PATH"
32486
32487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32488$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32489
32490  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32491    # Follow a chain of symbolic links. Use readlink
32492    # where it exists, else fall back to horribly
32493    # complicated shell code.
32494    if test "x$READLINK_TESTED" != yes; then
32495      # On MacOSX there is a readlink tool with a different
32496      # purpose than the GNU readlink tool. Check the found readlink.
32497      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32498      if test "x$ISGNU" = x; then
32499        # A readlink that we do not know how to use.
32500        # Are there other non-GNU readlinks out there?
32501        READLINK_TESTED=yes
32502        READLINK=
32503      fi
32504    fi
32505
32506    if test "x$READLINK" != x; then
32507      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32508    else
32509      # Save the current directory for restoring afterwards
32510      STARTDIR=$PWD
32511      COUNTER=0
32512      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32513      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32514      cd $sym_link_dir
32515      # Use -P flag to resolve symlinks in directories.
32516      cd `$THEPWDCMD -P`
32517      sym_link_dir=`$THEPWDCMD -P`
32518      # Resolve file symlinks
32519      while test $COUNTER -lt 20; do
32520        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32521        if test "x$ISLINK" == x; then
32522          # This is not a symbolic link! We are done!
32523          break
32524        fi
32525        # Again resolve directory symlinks since the target of the just found
32526        # link could be in a different directory
32527        cd `$DIRNAME $ISLINK`
32528        sym_link_dir=`$THEPWDCMD -P`
32529        sym_link_file=`$BASENAME $ISLINK`
32530        let COUNTER=COUNTER+1
32531      done
32532      cd $STARTDIR
32533      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32534    fi
32535  fi
32536
32537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32538$as_echo "$PROPER_COMPILER_CC" >&6; }
32539    CC="$PROPER_COMPILER_CC"
32540  else
32541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32542$as_echo "no, keeping CC" >&6; }
32543  fi
32544
32545
32546  COMPILER=$CC
32547  COMPILER_NAME=$COMPILER_NAME
32548
32549  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32550    # cc -V output typically looks like
32551    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32552    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32553    # Check that this is likely to be the Solaris Studio cc.
32554    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32555    if test $? -ne 0; then
32556      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32557      { $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
32558$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32559      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32560$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32561      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32562$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32563      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32564    fi
32565    # Remove usage instructions (if present), and
32566    # collapse compiler output into a single line
32567    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32568        $SED -e 's/ *[Uu]sage:.*//'`
32569    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32570        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32571  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32572    # xlc -qversion output typically looks like
32573    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32574    #     Version: 11.01.0000.0015
32575    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32576    # Check that this is likely to be the IBM XL C compiler.
32577    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32578    if test $? -ne 0; then
32579      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32580      { $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
32581$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32582      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32583$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32584      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32585$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32586      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32587    fi
32588    # Collapse compiler output into a single line
32589    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32590    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32591        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32592  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32593    # There is no specific version flag, but all output starts with a version string.
32594    # First line typically looks something like:
32595    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32596    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32597    # Check that this is likely to be Microsoft CL.EXE.
32598    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32599    if test $? -ne 0; then
32600      { $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
32601$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32602      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32603$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32604      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32605    fi
32606    # Collapse compiler output into a single line
32607    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32608    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32609        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32610  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32611    # gcc --version output typically looks like
32612    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32613    #     Copyright (C) 2013 Free Software Foundation, Inc.
32614    #     This is free software; see the source for copying conditions.  There is NO
32615    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32616    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32617    # Check that this is likely to be GCC.
32618    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32619    if test $? -ne 0; then
32620      { $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
32621$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32622      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32623$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32624      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32625    fi
32626    # Remove Copyright and legalese from version string, and
32627    # collapse into a single line
32628    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32629        $SED -e 's/ *Copyright .*//'`
32630    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32631        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32632  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32633    # clang --version output typically looks like
32634    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32635    #    clang version 3.3 (tags/RELEASE_33/final)
32636    # or
32637    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32638    #    Target: x86_64-pc-linux-gnu
32639    #    Thread model: posix
32640    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32641    # Check that this is likely to be clang
32642    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32643    if test $? -ne 0; then
32644      { $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
32645$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32646      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32647$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32648      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32649    fi
32650    # Collapse compiler output into a single line
32651    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32652    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32653        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32654  else
32655      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32656  fi
32657  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32658  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32659  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32660  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32661
32662  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32663$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32664
32665
32666  # Now that we have resolved CC ourself, let autoconf have its go at it
32667  ac_ext=c
32668ac_cpp='$CPP $CPPFLAGS'
32669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32671ac_compiler_gnu=$ac_cv_c_compiler_gnu
32672if test -n "$ac_tool_prefix"; then
32673  for ac_prog in $CC
32674  do
32675    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32676set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32678$as_echo_n "checking for $ac_word... " >&6; }
32679if ${ac_cv_prog_CC+:} false; then :
32680  $as_echo_n "(cached) " >&6
32681else
32682  if test -n "$CC"; then
32683  ac_cv_prog_CC="$CC" # Let the user override the test.
32684else
32685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32686for as_dir in $PATH
32687do
32688  IFS=$as_save_IFS
32689  test -z "$as_dir" && as_dir=.
32690    for ac_exec_ext in '' $ac_executable_extensions; do
32691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32692    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32694    break 2
32695  fi
32696done
32697  done
32698IFS=$as_save_IFS
32699
32700fi
32701fi
32702CC=$ac_cv_prog_CC
32703if test -n "$CC"; then
32704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32705$as_echo "$CC" >&6; }
32706else
32707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32708$as_echo "no" >&6; }
32709fi
32710
32711
32712    test -n "$CC" && break
32713  done
32714fi
32715if test -z "$CC"; then
32716  ac_ct_CC=$CC
32717  for ac_prog in $CC
32718do
32719  # Extract the first word of "$ac_prog", so it can be a program name with args.
32720set dummy $ac_prog; ac_word=$2
32721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32722$as_echo_n "checking for $ac_word... " >&6; }
32723if ${ac_cv_prog_ac_ct_CC+:} false; then :
32724  $as_echo_n "(cached) " >&6
32725else
32726  if test -n "$ac_ct_CC"; then
32727  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32728else
32729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32730for as_dir in $PATH
32731do
32732  IFS=$as_save_IFS
32733  test -z "$as_dir" && as_dir=.
32734    for ac_exec_ext in '' $ac_executable_extensions; do
32735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32736    ac_cv_prog_ac_ct_CC="$ac_prog"
32737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32738    break 2
32739  fi
32740done
32741  done
32742IFS=$as_save_IFS
32743
32744fi
32745fi
32746ac_ct_CC=$ac_cv_prog_ac_ct_CC
32747if test -n "$ac_ct_CC"; then
32748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32749$as_echo "$ac_ct_CC" >&6; }
32750else
32751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32752$as_echo "no" >&6; }
32753fi
32754
32755
32756  test -n "$ac_ct_CC" && break
32757done
32758
32759  if test "x$ac_ct_CC" = x; then
32760    CC=""
32761  else
32762    case $cross_compiling:$ac_tool_warned in
32763yes:)
32764{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32765$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32766ac_tool_warned=yes ;;
32767esac
32768    CC=$ac_ct_CC
32769  fi
32770fi
32771
32772
32773test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32775as_fn_error $? "no acceptable C compiler found in \$PATH
32776See \`config.log' for more details" "$LINENO" 5; }
32777
32778# Provide some information about the compiler.
32779$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32780set X $ac_compile
32781ac_compiler=$2
32782for ac_option in --version -v -V -qversion; do
32783  { { ac_try="$ac_compiler $ac_option >&5"
32784case "(($ac_try" in
32785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32786  *) ac_try_echo=$ac_try;;
32787esac
32788eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32789$as_echo "$ac_try_echo"; } >&5
32790  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32791  ac_status=$?
32792  if test -s conftest.err; then
32793    sed '10a\
32794... rest of stderr output deleted ...
32795         10q' conftest.err >conftest.er1
32796    cat conftest.er1 >&5
32797  fi
32798  rm -f conftest.er1 conftest.err
32799  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32800  test $ac_status = 0; }
32801done
32802
32803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32804/* end confdefs.h.  */
32805
32806int
32807main ()
32808{
32809
32810  ;
32811  return 0;
32812}
32813_ACEOF
32814ac_clean_files_save=$ac_clean_files
32815ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32816# Try to create an executable without -o first, disregard a.out.
32817# It will help us diagnose broken compilers, and finding out an intuition
32818# of exeext.
32819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32820$as_echo_n "checking whether the C compiler works... " >&6; }
32821ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32822
32823# The possible output files:
32824ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32825
32826ac_rmfiles=
32827for ac_file in $ac_files
32828do
32829  case $ac_file in
32830    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32831    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32832  esac
32833done
32834rm -f $ac_rmfiles
32835
32836if { { ac_try="$ac_link_default"
32837case "(($ac_try" in
32838  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32839  *) ac_try_echo=$ac_try;;
32840esac
32841eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32842$as_echo "$ac_try_echo"; } >&5
32843  (eval "$ac_link_default") 2>&5
32844  ac_status=$?
32845  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32846  test $ac_status = 0; }; then :
32847  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32848# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32849# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32850# so that the user can short-circuit this test for compilers unknown to
32851# Autoconf.
32852for ac_file in $ac_files ''
32853do
32854  test -f "$ac_file" || continue
32855  case $ac_file in
32856    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32857	;;
32858    [ab].out )
32859	# We found the default executable, but exeext='' is most
32860	# certainly right.
32861	break;;
32862    *.* )
32863	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32864	then :; else
32865	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32866	fi
32867	# We set ac_cv_exeext here because the later test for it is not
32868	# safe: cross compilers may not add the suffix if given an `-o'
32869	# argument, so we may need to know it at that point already.
32870	# Even if this section looks crufty: it has the advantage of
32871	# actually working.
32872	break;;
32873    * )
32874	break;;
32875  esac
32876done
32877test "$ac_cv_exeext" = no && ac_cv_exeext=
32878
32879else
32880  ac_file=''
32881fi
32882if test -z "$ac_file"; then :
32883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32884$as_echo "no" >&6; }
32885$as_echo "$as_me: failed program was:" >&5
32886sed 's/^/| /' conftest.$ac_ext >&5
32887
32888{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32890as_fn_error 77 "C compiler cannot create executables
32891See \`config.log' for more details" "$LINENO" 5; }
32892else
32893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32894$as_echo "yes" >&6; }
32895fi
32896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32897$as_echo_n "checking for C compiler default output file name... " >&6; }
32898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32899$as_echo "$ac_file" >&6; }
32900ac_exeext=$ac_cv_exeext
32901
32902rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32903ac_clean_files=$ac_clean_files_save
32904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32905$as_echo_n "checking for suffix of executables... " >&6; }
32906if { { ac_try="$ac_link"
32907case "(($ac_try" in
32908  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32909  *) ac_try_echo=$ac_try;;
32910esac
32911eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32912$as_echo "$ac_try_echo"; } >&5
32913  (eval "$ac_link") 2>&5
32914  ac_status=$?
32915  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32916  test $ac_status = 0; }; then :
32917  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32918# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32919# work properly (i.e., refer to `conftest.exe'), while it won't with
32920# `rm'.
32921for ac_file in conftest.exe conftest conftest.*; do
32922  test -f "$ac_file" || continue
32923  case $ac_file in
32924    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32925    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32926	  break;;
32927    * ) break;;
32928  esac
32929done
32930else
32931  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32932$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32933as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32934See \`config.log' for more details" "$LINENO" 5; }
32935fi
32936rm -f conftest conftest$ac_cv_exeext
32937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32938$as_echo "$ac_cv_exeext" >&6; }
32939
32940rm -f conftest.$ac_ext
32941EXEEXT=$ac_cv_exeext
32942ac_exeext=$EXEEXT
32943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32944/* end confdefs.h.  */
32945#include <stdio.h>
32946int
32947main ()
32948{
32949FILE *f = fopen ("conftest.out", "w");
32950 return ferror (f) || fclose (f) != 0;
32951
32952  ;
32953  return 0;
32954}
32955_ACEOF
32956ac_clean_files="$ac_clean_files conftest.out"
32957# Check that the compiler produces executables we can run.  If not, either
32958# the compiler is broken, or we cross compile.
32959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32960$as_echo_n "checking whether we are cross compiling... " >&6; }
32961if test "$cross_compiling" != yes; then
32962  { { ac_try="$ac_link"
32963case "(($ac_try" in
32964  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32965  *) ac_try_echo=$ac_try;;
32966esac
32967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32968$as_echo "$ac_try_echo"; } >&5
32969  (eval "$ac_link") 2>&5
32970  ac_status=$?
32971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32972  test $ac_status = 0; }
32973  if { ac_try='./conftest$ac_cv_exeext'
32974  { { case "(($ac_try" in
32975  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32976  *) ac_try_echo=$ac_try;;
32977esac
32978eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32979$as_echo "$ac_try_echo"; } >&5
32980  (eval "$ac_try") 2>&5
32981  ac_status=$?
32982  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32983  test $ac_status = 0; }; }; then
32984    cross_compiling=no
32985  else
32986    if test "$cross_compiling" = maybe; then
32987	cross_compiling=yes
32988    else
32989	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32991as_fn_error $? "cannot run C compiled programs.
32992If you meant to cross compile, use \`--host'.
32993See \`config.log' for more details" "$LINENO" 5; }
32994    fi
32995  fi
32996fi
32997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32998$as_echo "$cross_compiling" >&6; }
32999
33000rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33001ac_clean_files=$ac_clean_files_save
33002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33003$as_echo_n "checking for suffix of object files... " >&6; }
33004if ${ac_cv_objext+:} false; then :
33005  $as_echo_n "(cached) " >&6
33006else
33007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33008/* end confdefs.h.  */
33009
33010int
33011main ()
33012{
33013
33014  ;
33015  return 0;
33016}
33017_ACEOF
33018rm -f conftest.o conftest.obj
33019if { { ac_try="$ac_compile"
33020case "(($ac_try" in
33021  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33022  *) ac_try_echo=$ac_try;;
33023esac
33024eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33025$as_echo "$ac_try_echo"; } >&5
33026  (eval "$ac_compile") 2>&5
33027  ac_status=$?
33028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33029  test $ac_status = 0; }; then :
33030  for ac_file in conftest.o conftest.obj conftest.*; do
33031  test -f "$ac_file" || continue;
33032  case $ac_file in
33033    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33034    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33035       break;;
33036  esac
33037done
33038else
33039  $as_echo "$as_me: failed program was:" >&5
33040sed 's/^/| /' conftest.$ac_ext >&5
33041
33042{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33044as_fn_error $? "cannot compute suffix of object files: cannot compile
33045See \`config.log' for more details" "$LINENO" 5; }
33046fi
33047rm -f conftest.$ac_cv_objext conftest.$ac_ext
33048fi
33049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33050$as_echo "$ac_cv_objext" >&6; }
33051OBJEXT=$ac_cv_objext
33052ac_objext=$OBJEXT
33053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33054$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33055if ${ac_cv_c_compiler_gnu+:} false; then :
33056  $as_echo_n "(cached) " >&6
33057else
33058  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33059/* end confdefs.h.  */
33060
33061int
33062main ()
33063{
33064#ifndef __GNUC__
33065       choke me
33066#endif
33067
33068  ;
33069  return 0;
33070}
33071_ACEOF
33072if ac_fn_c_try_compile "$LINENO"; then :
33073  ac_compiler_gnu=yes
33074else
33075  ac_compiler_gnu=no
33076fi
33077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33078ac_cv_c_compiler_gnu=$ac_compiler_gnu
33079
33080fi
33081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33082$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33083if test $ac_compiler_gnu = yes; then
33084  GCC=yes
33085else
33086  GCC=
33087fi
33088ac_test_CFLAGS=${CFLAGS+set}
33089ac_save_CFLAGS=$CFLAGS
33090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33091$as_echo_n "checking whether $CC accepts -g... " >&6; }
33092if ${ac_cv_prog_cc_g+:} false; then :
33093  $as_echo_n "(cached) " >&6
33094else
33095  ac_save_c_werror_flag=$ac_c_werror_flag
33096   ac_c_werror_flag=yes
33097   ac_cv_prog_cc_g=no
33098   CFLAGS="-g"
33099   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33100/* end confdefs.h.  */
33101
33102int
33103main ()
33104{
33105
33106  ;
33107  return 0;
33108}
33109_ACEOF
33110if ac_fn_c_try_compile "$LINENO"; then :
33111  ac_cv_prog_cc_g=yes
33112else
33113  CFLAGS=""
33114      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33115/* end confdefs.h.  */
33116
33117int
33118main ()
33119{
33120
33121  ;
33122  return 0;
33123}
33124_ACEOF
33125if ac_fn_c_try_compile "$LINENO"; then :
33126
33127else
33128  ac_c_werror_flag=$ac_save_c_werror_flag
33129	 CFLAGS="-g"
33130	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33131/* end confdefs.h.  */
33132
33133int
33134main ()
33135{
33136
33137  ;
33138  return 0;
33139}
33140_ACEOF
33141if ac_fn_c_try_compile "$LINENO"; then :
33142  ac_cv_prog_cc_g=yes
33143fi
33144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33145fi
33146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33147fi
33148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33149   ac_c_werror_flag=$ac_save_c_werror_flag
33150fi
33151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33152$as_echo "$ac_cv_prog_cc_g" >&6; }
33153if test "$ac_test_CFLAGS" = set; then
33154  CFLAGS=$ac_save_CFLAGS
33155elif test $ac_cv_prog_cc_g = yes; then
33156  if test "$GCC" = yes; then
33157    CFLAGS="-g -O2"
33158  else
33159    CFLAGS="-g"
33160  fi
33161else
33162  if test "$GCC" = yes; then
33163    CFLAGS="-O2"
33164  else
33165    CFLAGS=
33166  fi
33167fi
33168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33169$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33170if ${ac_cv_prog_cc_c89+:} false; then :
33171  $as_echo_n "(cached) " >&6
33172else
33173  ac_cv_prog_cc_c89=no
33174ac_save_CC=$CC
33175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33176/* end confdefs.h.  */
33177#include <stdarg.h>
33178#include <stdio.h>
33179struct stat;
33180/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33181struct buf { int x; };
33182FILE * (*rcsopen) (struct buf *, struct stat *, int);
33183static char *e (p, i)
33184     char **p;
33185     int i;
33186{
33187  return p[i];
33188}
33189static char *f (char * (*g) (char **, int), char **p, ...)
33190{
33191  char *s;
33192  va_list v;
33193  va_start (v,p);
33194  s = g (p, va_arg (v,int));
33195  va_end (v);
33196  return s;
33197}
33198
33199/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33200   function prototypes and stuff, but not '\xHH' hex character constants.
33201   These don't provoke an error unfortunately, instead are silently treated
33202   as 'x'.  The following induces an error, until -std is added to get
33203   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33204   array size at least.  It's necessary to write '\x00'==0 to get something
33205   that's true only with -std.  */
33206int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33207
33208/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33209   inside strings and character constants.  */
33210#define FOO(x) 'x'
33211int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33212
33213int test (int i, double x);
33214struct s1 {int (*f) (int a);};
33215struct s2 {int (*f) (double a);};
33216int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33217int argc;
33218char **argv;
33219int
33220main ()
33221{
33222return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33223  ;
33224  return 0;
33225}
33226_ACEOF
33227for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33228	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33229do
33230  CC="$ac_save_CC $ac_arg"
33231  if ac_fn_c_try_compile "$LINENO"; then :
33232  ac_cv_prog_cc_c89=$ac_arg
33233fi
33234rm -f core conftest.err conftest.$ac_objext
33235  test "x$ac_cv_prog_cc_c89" != "xno" && break
33236done
33237rm -f conftest.$ac_ext
33238CC=$ac_save_CC
33239
33240fi
33241# AC_CACHE_VAL
33242case "x$ac_cv_prog_cc_c89" in
33243  x)
33244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33245$as_echo "none needed" >&6; } ;;
33246  xno)
33247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33248$as_echo "unsupported" >&6; } ;;
33249  *)
33250    CC="$CC $ac_cv_prog_cc_c89"
33251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33252$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33253esac
33254if test "x$ac_cv_prog_cc_c89" != xno; then :
33255
33256fi
33257
33258ac_ext=cpp
33259ac_cpp='$CXXCPP $CPPFLAGS'
33260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33263
33264
33265
33266  COMPILER_NAME=C++
33267  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33268
33269  if test "x$CXX" != x; then
33270    # User has supplied compiler name already, always let that override.
33271    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33272$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33273    if test "x`basename $CXX`" = "x$CXX"; then
33274      # A command without a complete path is provided, search $PATH.
33275
33276      for ac_prog in $CXX
33277do
33278  # Extract the first word of "$ac_prog", so it can be a program name with args.
33279set dummy $ac_prog; ac_word=$2
33280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33281$as_echo_n "checking for $ac_word... " >&6; }
33282if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33283  $as_echo_n "(cached) " >&6
33284else
33285  case $POTENTIAL_CXX in
33286  [\\/]* | ?:[\\/]*)
33287  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33288  ;;
33289  *)
33290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33291for as_dir in $PATH
33292do
33293  IFS=$as_save_IFS
33294  test -z "$as_dir" && as_dir=.
33295    for ac_exec_ext in '' $ac_executable_extensions; do
33296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33297    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33299    break 2
33300  fi
33301done
33302  done
33303IFS=$as_save_IFS
33304
33305  ;;
33306esac
33307fi
33308POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33309if test -n "$POTENTIAL_CXX"; then
33310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33311$as_echo "$POTENTIAL_CXX" >&6; }
33312else
33313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33314$as_echo "no" >&6; }
33315fi
33316
33317
33318  test -n "$POTENTIAL_CXX" && break
33319done
33320
33321      if test "x$POTENTIAL_CXX" != x; then
33322        CXX=$POTENTIAL_CXX
33323      else
33324        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33325      fi
33326    else
33327      # Otherwise it might already be a complete path
33328      if test ! -x "$CXX"; then
33329        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33330      fi
33331    fi
33332  else
33333    # No user supplied value. Locate compiler ourselves.
33334
33335    # If we are cross compiling, assume cross compilation tools follows the
33336    # cross compilation standard where they are prefixed with the autoconf
33337    # standard name for the target. For example the binary
33338    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33339    # If we are not cross compiling, then the default compiler name will be
33340    # used.
33341
33342    CXX=
33343    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33344    # before checking the rest of the PATH.
33345    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33346    # step, this should not be necessary.
33347    if test -n "$TOOLCHAIN_PATH"; then
33348      PATH_save="$PATH"
33349      PATH="$TOOLCHAIN_PATH"
33350      for ac_prog in $SEARCH_LIST
33351do
33352  # Extract the first word of "$ac_prog", so it can be a program name with args.
33353set dummy $ac_prog; ac_word=$2
33354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33355$as_echo_n "checking for $ac_word... " >&6; }
33356if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33357  $as_echo_n "(cached) " >&6
33358else
33359  case $TOOLCHAIN_PATH_CXX in
33360  [\\/]* | ?:[\\/]*)
33361  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33362  ;;
33363  *)
33364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33365for as_dir in $PATH
33366do
33367  IFS=$as_save_IFS
33368  test -z "$as_dir" && as_dir=.
33369    for ac_exec_ext in '' $ac_executable_extensions; do
33370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33371    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33373    break 2
33374  fi
33375done
33376  done
33377IFS=$as_save_IFS
33378
33379  ;;
33380esac
33381fi
33382TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33383if test -n "$TOOLCHAIN_PATH_CXX"; then
33384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33385$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33386else
33387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33388$as_echo "no" >&6; }
33389fi
33390
33391
33392  test -n "$TOOLCHAIN_PATH_CXX" && break
33393done
33394
33395      CXX=$TOOLCHAIN_PATH_CXX
33396      PATH="$PATH_save"
33397    fi
33398
33399    # AC_PATH_PROGS can't be run multiple times with the same variable,
33400    # so create a new name for this run.
33401    if test "x$CXX" = x; then
33402      for ac_prog in $SEARCH_LIST
33403do
33404  # Extract the first word of "$ac_prog", so it can be a program name with args.
33405set dummy $ac_prog; ac_word=$2
33406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33407$as_echo_n "checking for $ac_word... " >&6; }
33408if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33409  $as_echo_n "(cached) " >&6
33410else
33411  case $POTENTIAL_CXX in
33412  [\\/]* | ?:[\\/]*)
33413  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33414  ;;
33415  *)
33416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33417for as_dir in $PATH
33418do
33419  IFS=$as_save_IFS
33420  test -z "$as_dir" && as_dir=.
33421    for ac_exec_ext in '' $ac_executable_extensions; do
33422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33423    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33425    break 2
33426  fi
33427done
33428  done
33429IFS=$as_save_IFS
33430
33431  ;;
33432esac
33433fi
33434POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33435if test -n "$POTENTIAL_CXX"; then
33436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33437$as_echo "$POTENTIAL_CXX" >&6; }
33438else
33439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33440$as_echo "no" >&6; }
33441fi
33442
33443
33444  test -n "$POTENTIAL_CXX" && break
33445done
33446
33447      CXX=$POTENTIAL_CXX
33448    fi
33449
33450    if test "x$CXX" = x; then
33451
33452  # Print a helpful message on how to acquire the necessary build dependency.
33453  # devkit is the help tag: freetype, cups, alsa etc
33454  MISSING_DEPENDENCY=devkit
33455
33456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33457    cygwin_help $MISSING_DEPENDENCY
33458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33459    msys_help $MISSING_DEPENDENCY
33460  else
33461    PKGHANDLER_COMMAND=
33462
33463    case $PKGHANDLER in
33464      apt-get)
33465        apt_help     $MISSING_DEPENDENCY ;;
33466      yum)
33467        yum_help     $MISSING_DEPENDENCY ;;
33468      port)
33469        port_help    $MISSING_DEPENDENCY ;;
33470      pkgutil)
33471        pkgutil_help $MISSING_DEPENDENCY ;;
33472      pkgadd)
33473        pkgadd_help  $MISSING_DEPENDENCY ;;
33474    esac
33475
33476    if test "x$PKGHANDLER_COMMAND" != x; then
33477      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33478    fi
33479  fi
33480
33481      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33482    fi
33483  fi
33484
33485  # Now we have a compiler binary in CXX. Make sure it's okay.
33486
33487  # Only process if variable expands to non-empty
33488
33489  if test "x$CXX" != x; then
33490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33491
33492  # First separate the path from the arguments. This will split at the first
33493  # space.
33494  complete="$CXX"
33495  path="${complete%% *}"
33496  tmp="$complete EOL"
33497  arguments="${tmp#* }"
33498
33499  # Input might be given as Windows format, start by converting to
33500  # unix format.
33501  new_path=`$CYGPATH -u "$path"`
33502
33503  # Now try to locate executable using which
33504  new_path=`$WHICH "$new_path" 2> /dev/null`
33505  # bat and cmd files are not always considered executable in cygwin causing which
33506  # to not find them
33507  if test "x$new_path" = x \
33508      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33509      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33510    new_path=`$CYGPATH -u "$path"`
33511  fi
33512  if test "x$new_path" = x; then
33513    # Oops. Which didn't find the executable.
33514    # The splitting of arguments from the executable at a space might have been incorrect,
33515    # since paths with space are more likely in Windows. Give it another try with the whole
33516    # argument.
33517    path="$complete"
33518    arguments="EOL"
33519    new_path=`$CYGPATH -u "$path"`
33520    new_path=`$WHICH "$new_path" 2> /dev/null`
33521    # bat and cmd files are not always considered executable in cygwin causing which
33522    # to not find them
33523    if test "x$new_path" = x \
33524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33526      new_path=`$CYGPATH -u "$path"`
33527    fi
33528    if test "x$new_path" = x; then
33529      # It's still not found. Now this is an unrecoverable error.
33530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33531$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33532      has_space=`$ECHO "$complete" | $GREP " "`
33533      if test "x$has_space" != x; then
33534        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33535$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33536      fi
33537      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33538    fi
33539  fi
33540
33541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33544  # "foo.exe" is OK but "foo" is an error.
33545  #
33546  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33547  # It is also a way to make sure we got the proper file name for the real test later on.
33548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33549  if test "x$test_shortpath" = x; then
33550    # Short path failed, file does not exist as specified.
33551    # Try adding .exe or .cmd
33552    if test -f "${new_path}.exe"; then
33553      input_to_shortpath="${new_path}.exe"
33554    elif test -f "${new_path}.cmd"; then
33555      input_to_shortpath="${new_path}.cmd"
33556    else
33557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33558$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33559      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33560$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33561      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33562    fi
33563  else
33564    input_to_shortpath="$new_path"
33565  fi
33566
33567  # Call helper function which possibly converts this using DOS-style short mode.
33568  # If so, the updated path is stored in $new_path.
33569  new_path="$input_to_shortpath"
33570
33571  input_path="$input_to_shortpath"
33572  # Check if we need to convert this using DOS-style short mode. If the path
33573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33574  # take no chances and rewrite it.
33575  # Note: m4 eats our [], so we need to use [ and ] instead.
33576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33577  if test "x$has_forbidden_chars" != x; then
33578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33582      # Going to short mode and back again did indeed matter. Since short mode is
33583      # case insensitive, let's make it lowercase to improve readability.
33584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33585      # Now convert it back to Unix-style (cygpath)
33586      input_path=`$CYGPATH -u "$shortmode_path"`
33587      new_path="$input_path"
33588    fi
33589  fi
33590
33591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33592  if test "x$test_cygdrive_prefix" = x; then
33593    # As a simple fix, exclude /usr/bin since it's not a real path.
33594    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33596      # a path prefixed by /cygdrive for fixpath to work.
33597      new_path="$CYGWIN_ROOT_PATH$input_path"
33598    fi
33599  fi
33600
33601  # remove trailing .exe if any
33602  new_path="${new_path/%.exe/}"
33603
33604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33605
33606  # First separate the path from the arguments. This will split at the first
33607  # space.
33608  complete="$CXX"
33609  path="${complete%% *}"
33610  tmp="$complete EOL"
33611  arguments="${tmp#* }"
33612
33613  # Input might be given as Windows format, start by converting to
33614  # unix format.
33615  new_path="$path"
33616
33617  windows_path="$new_path"
33618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33619    unix_path=`$CYGPATH -u "$windows_path"`
33620    new_path="$unix_path"
33621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33623    new_path="$unix_path"
33624  fi
33625
33626
33627  # Now try to locate executable using which
33628  new_path=`$WHICH "$new_path" 2> /dev/null`
33629
33630  if test "x$new_path" = x; then
33631    # Oops. Which didn't find the executable.
33632    # The splitting of arguments from the executable at a space might have been incorrect,
33633    # since paths with space are more likely in Windows. Give it another try with the whole
33634    # argument.
33635    path="$complete"
33636    arguments="EOL"
33637    new_path="$path"
33638
33639  windows_path="$new_path"
33640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33641    unix_path=`$CYGPATH -u "$windows_path"`
33642    new_path="$unix_path"
33643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33645    new_path="$unix_path"
33646  fi
33647
33648
33649    new_path=`$WHICH "$new_path" 2> /dev/null`
33650    # bat and cmd files are not always considered executable in MSYS causing which
33651    # to not find them
33652    if test "x$new_path" = x \
33653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33655      new_path="$path"
33656
33657  windows_path="$new_path"
33658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33659    unix_path=`$CYGPATH -u "$windows_path"`
33660    new_path="$unix_path"
33661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33663    new_path="$unix_path"
33664  fi
33665
33666    fi
33667
33668    if test "x$new_path" = x; then
33669      # It's still not found. Now this is an unrecoverable error.
33670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33671$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33672      has_space=`$ECHO "$complete" | $GREP " "`
33673      if test "x$has_space" != x; then
33674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33676      fi
33677      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33678    fi
33679  fi
33680
33681  # Now new_path has a complete unix path to the binary
33682  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33683    # Keep paths in /bin as-is, but remove trailing .exe if any
33684    new_path="${new_path/%.exe/}"
33685    # Do not save /bin paths to all_fixpath_prefixes!
33686  else
33687    # Not in mixed or Windows style, start by that.
33688    new_path=`cmd //c echo $new_path`
33689
33690  input_path="$new_path"
33691  # Check if we need to convert this using DOS-style short mode. If the path
33692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33693  # take no chances and rewrite it.
33694  # Note: m4 eats our [], so we need to use [ and ] instead.
33695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33696  if test "x$has_forbidden_chars" != x; then
33697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33699  fi
33700
33701    # Output is in $new_path
33702
33703  windows_path="$new_path"
33704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33705    unix_path=`$CYGPATH -u "$windows_path"`
33706    new_path="$unix_path"
33707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33709    new_path="$unix_path"
33710  fi
33711
33712    # remove trailing .exe if any
33713    new_path="${new_path/%.exe/}"
33714
33715    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33716    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33717  fi
33718
33719    else
33720      # We're on a unix platform. Hooray! :)
33721      # First separate the path from the arguments. This will split at the first
33722      # space.
33723      complete="$CXX"
33724      path="${complete%% *}"
33725      tmp="$complete EOL"
33726      arguments="${tmp#* }"
33727
33728      # Cannot rely on the command "which" here since it doesn't always work.
33729      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33730      if test -z "$is_absolute_path"; then
33731        # Path to executable is not absolute. Find it.
33732        IFS_save="$IFS"
33733        IFS=:
33734        for p in $PATH; do
33735          if test -f "$p/$path" && test -x "$p/$path"; then
33736            new_path="$p/$path"
33737            break
33738          fi
33739        done
33740        IFS="$IFS_save"
33741      else
33742        # This is an absolute path, we can use it without further modifications.
33743        new_path="$path"
33744      fi
33745
33746      if test "x$new_path" = x; then
33747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33748$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33749        has_space=`$ECHO "$complete" | $GREP " "`
33750        if test "x$has_space" != x; then
33751          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33752$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33753        fi
33754        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33755      fi
33756    fi
33757
33758    # Now join together the path and the arguments once again
33759    if test "x$arguments" != xEOL; then
33760      new_complete="$new_path ${arguments% *}"
33761    else
33762      new_complete="$new_path"
33763    fi
33764
33765    if test "x$complete" != "x$new_complete"; then
33766      CXX="$new_complete"
33767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33768$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33769    fi
33770  fi
33771
33772  TEST_COMPILER="$CXX"
33773  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33774  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33775  if test "x$OPENJDK_BUILD_OS" != xaix; then
33776    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33778$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33779
33780  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33781    # Follow a chain of symbolic links. Use readlink
33782    # where it exists, else fall back to horribly
33783    # complicated shell code.
33784    if test "x$READLINK_TESTED" != yes; then
33785      # On MacOSX there is a readlink tool with a different
33786      # purpose than the GNU readlink tool. Check the found readlink.
33787      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33788      if test "x$ISGNU" = x; then
33789        # A readlink that we do not know how to use.
33790        # Are there other non-GNU readlinks out there?
33791        READLINK_TESTED=yes
33792        READLINK=
33793      fi
33794    fi
33795
33796    if test "x$READLINK" != x; then
33797      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33798    else
33799      # Save the current directory for restoring afterwards
33800      STARTDIR=$PWD
33801      COUNTER=0
33802      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33803      sym_link_file=`$BASENAME $TEST_COMPILER`
33804      cd $sym_link_dir
33805      # Use -P flag to resolve symlinks in directories.
33806      cd `$THEPWDCMD -P`
33807      sym_link_dir=`$THEPWDCMD -P`
33808      # Resolve file symlinks
33809      while test $COUNTER -lt 20; do
33810        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33811        if test "x$ISLINK" == x; then
33812          # This is not a symbolic link! We are done!
33813          break
33814        fi
33815        # Again resolve directory symlinks since the target of the just found
33816        # link could be in a different directory
33817        cd `$DIRNAME $ISLINK`
33818        sym_link_dir=`$THEPWDCMD -P`
33819        sym_link_file=`$BASENAME $ISLINK`
33820        let COUNTER=COUNTER+1
33821      done
33822      cd $STARTDIR
33823      TEST_COMPILER=$sym_link_dir/$sym_link_file
33824    fi
33825  fi
33826
33827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33828$as_echo "$TEST_COMPILER" >&6; }
33829  fi
33830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33831$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33832
33833  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33834  if test "x$COMPILER_BASENAME" = "xccache"; then
33835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33836$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33837    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33838    # We want to control ccache invocation ourselves, so ignore this cc and try
33839    # searching again.
33840
33841    # Remove the path to the fake ccache cc from the PATH
33842    RETRY_COMPILER_SAVED_PATH="$PATH"
33843    COMPILER_DIRNAME=`$DIRNAME $CXX`
33844    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33845
33846    # Try again looking for our compiler
33847    if test -n "$ac_tool_prefix"; then
33848  for ac_prog in $TOOLCHAIN_CXX_BINARY
33849  do
33850    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33851set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33853$as_echo_n "checking for $ac_word... " >&6; }
33854if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33855  $as_echo_n "(cached) " >&6
33856else
33857  if test -n "$PROPER_COMPILER_CXX"; then
33858  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33859else
33860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33861for as_dir in $PATH
33862do
33863  IFS=$as_save_IFS
33864  test -z "$as_dir" && as_dir=.
33865    for ac_exec_ext in '' $ac_executable_extensions; do
33866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33867    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33869    break 2
33870  fi
33871done
33872  done
33873IFS=$as_save_IFS
33874
33875fi
33876fi
33877PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33878if test -n "$PROPER_COMPILER_CXX"; then
33879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33880$as_echo "$PROPER_COMPILER_CXX" >&6; }
33881else
33882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33883$as_echo "no" >&6; }
33884fi
33885
33886
33887    test -n "$PROPER_COMPILER_CXX" && break
33888  done
33889fi
33890if test -z "$PROPER_COMPILER_CXX"; then
33891  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33892  for ac_prog in $TOOLCHAIN_CXX_BINARY
33893do
33894  # Extract the first word of "$ac_prog", so it can be a program name with args.
33895set dummy $ac_prog; ac_word=$2
33896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33897$as_echo_n "checking for $ac_word... " >&6; }
33898if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33899  $as_echo_n "(cached) " >&6
33900else
33901  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33902  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33903else
33904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33905for as_dir in $PATH
33906do
33907  IFS=$as_save_IFS
33908  test -z "$as_dir" && as_dir=.
33909    for ac_exec_ext in '' $ac_executable_extensions; do
33910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33911    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33913    break 2
33914  fi
33915done
33916  done
33917IFS=$as_save_IFS
33918
33919fi
33920fi
33921ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33922if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33924$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33925else
33926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33927$as_echo "no" >&6; }
33928fi
33929
33930
33931  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33932done
33933
33934  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33935    PROPER_COMPILER_CXX=""
33936  else
33937    case $cross_compiling:$ac_tool_warned in
33938yes:)
33939{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33940$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33941ac_tool_warned=yes ;;
33942esac
33943    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33944  fi
33945fi
33946
33947
33948  # Only process if variable expands to non-empty
33949
33950  if test "x$PROPER_COMPILER_CXX" != x; then
33951    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33952
33953  # First separate the path from the arguments. This will split at the first
33954  # space.
33955  complete="$PROPER_COMPILER_CXX"
33956  path="${complete%% *}"
33957  tmp="$complete EOL"
33958  arguments="${tmp#* }"
33959
33960  # Input might be given as Windows format, start by converting to
33961  # unix format.
33962  new_path=`$CYGPATH -u "$path"`
33963
33964  # Now try to locate executable using which
33965  new_path=`$WHICH "$new_path" 2> /dev/null`
33966  # bat and cmd files are not always considered executable in cygwin causing which
33967  # to not find them
33968  if test "x$new_path" = x \
33969      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33970      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33971    new_path=`$CYGPATH -u "$path"`
33972  fi
33973  if test "x$new_path" = x; then
33974    # Oops. Which didn't find the executable.
33975    # The splitting of arguments from the executable at a space might have been incorrect,
33976    # since paths with space are more likely in Windows. Give it another try with the whole
33977    # argument.
33978    path="$complete"
33979    arguments="EOL"
33980    new_path=`$CYGPATH -u "$path"`
33981    new_path=`$WHICH "$new_path" 2> /dev/null`
33982    # bat and cmd files are not always considered executable in cygwin causing which
33983    # to not find them
33984    if test "x$new_path" = x \
33985        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33986        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33987      new_path=`$CYGPATH -u "$path"`
33988    fi
33989    if test "x$new_path" = x; then
33990      # It's still not found. Now this is an unrecoverable error.
33991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33992$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33993      has_space=`$ECHO "$complete" | $GREP " "`
33994      if test "x$has_space" != x; then
33995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33997      fi
33998      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33999    fi
34000  fi
34001
34002  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34003  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34004  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34005  # "foo.exe" is OK but "foo" is an error.
34006  #
34007  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34008  # It is also a way to make sure we got the proper file name for the real test later on.
34009  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34010  if test "x$test_shortpath" = x; then
34011    # Short path failed, file does not exist as specified.
34012    # Try adding .exe or .cmd
34013    if test -f "${new_path}.exe"; then
34014      input_to_shortpath="${new_path}.exe"
34015    elif test -f "${new_path}.cmd"; then
34016      input_to_shortpath="${new_path}.cmd"
34017    else
34018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
34019$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
34020      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34021$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34022      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34023    fi
34024  else
34025    input_to_shortpath="$new_path"
34026  fi
34027
34028  # Call helper function which possibly converts this using DOS-style short mode.
34029  # If so, the updated path is stored in $new_path.
34030  new_path="$input_to_shortpath"
34031
34032  input_path="$input_to_shortpath"
34033  # Check if we need to convert this using DOS-style short mode. If the path
34034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34035  # take no chances and rewrite it.
34036  # Note: m4 eats our [], so we need to use [ and ] instead.
34037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34038  if test "x$has_forbidden_chars" != x; then
34039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34043      # Going to short mode and back again did indeed matter. Since short mode is
34044      # case insensitive, let's make it lowercase to improve readability.
34045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34046      # Now convert it back to Unix-style (cygpath)
34047      input_path=`$CYGPATH -u "$shortmode_path"`
34048      new_path="$input_path"
34049    fi
34050  fi
34051
34052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34053  if test "x$test_cygdrive_prefix" = x; then
34054    # As a simple fix, exclude /usr/bin since it's not a real path.
34055    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34057      # a path prefixed by /cygdrive for fixpath to work.
34058      new_path="$CYGWIN_ROOT_PATH$input_path"
34059    fi
34060  fi
34061
34062  # remove trailing .exe if any
34063  new_path="${new_path/%.exe/}"
34064
34065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34066
34067  # First separate the path from the arguments. This will split at the first
34068  # space.
34069  complete="$PROPER_COMPILER_CXX"
34070  path="${complete%% *}"
34071  tmp="$complete EOL"
34072  arguments="${tmp#* }"
34073
34074  # Input might be given as Windows format, start by converting to
34075  # unix format.
34076  new_path="$path"
34077
34078  windows_path="$new_path"
34079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34080    unix_path=`$CYGPATH -u "$windows_path"`
34081    new_path="$unix_path"
34082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34084    new_path="$unix_path"
34085  fi
34086
34087
34088  # Now try to locate executable using which
34089  new_path=`$WHICH "$new_path" 2> /dev/null`
34090
34091  if test "x$new_path" = x; then
34092    # Oops. Which didn't find the executable.
34093    # The splitting of arguments from the executable at a space might have been incorrect,
34094    # since paths with space are more likely in Windows. Give it another try with the whole
34095    # argument.
34096    path="$complete"
34097    arguments="EOL"
34098    new_path="$path"
34099
34100  windows_path="$new_path"
34101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34102    unix_path=`$CYGPATH -u "$windows_path"`
34103    new_path="$unix_path"
34104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34106    new_path="$unix_path"
34107  fi
34108
34109
34110    new_path=`$WHICH "$new_path" 2> /dev/null`
34111    # bat and cmd files are not always considered executable in MSYS causing which
34112    # to not find them
34113    if test "x$new_path" = x \
34114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34116      new_path="$path"
34117
34118  windows_path="$new_path"
34119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34120    unix_path=`$CYGPATH -u "$windows_path"`
34121    new_path="$unix_path"
34122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34124    new_path="$unix_path"
34125  fi
34126
34127    fi
34128
34129    if test "x$new_path" = x; then
34130      # It's still not found. Now this is an unrecoverable error.
34131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34132$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34133      has_space=`$ECHO "$complete" | $GREP " "`
34134      if test "x$has_space" != x; then
34135        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34136$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34137      fi
34138      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34139    fi
34140  fi
34141
34142  # Now new_path has a complete unix path to the binary
34143  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34144    # Keep paths in /bin as-is, but remove trailing .exe if any
34145    new_path="${new_path/%.exe/}"
34146    # Do not save /bin paths to all_fixpath_prefixes!
34147  else
34148    # Not in mixed or Windows style, start by that.
34149    new_path=`cmd //c echo $new_path`
34150
34151  input_path="$new_path"
34152  # Check if we need to convert this using DOS-style short mode. If the path
34153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34154  # take no chances and rewrite it.
34155  # Note: m4 eats our [], so we need to use [ and ] instead.
34156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34157  if test "x$has_forbidden_chars" != x; then
34158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34160  fi
34161
34162    # Output is in $new_path
34163
34164  windows_path="$new_path"
34165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34166    unix_path=`$CYGPATH -u "$windows_path"`
34167    new_path="$unix_path"
34168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34170    new_path="$unix_path"
34171  fi
34172
34173    # remove trailing .exe if any
34174    new_path="${new_path/%.exe/}"
34175
34176    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34177    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34178  fi
34179
34180    else
34181      # We're on a unix platform. Hooray! :)
34182      # First separate the path from the arguments. This will split at the first
34183      # space.
34184      complete="$PROPER_COMPILER_CXX"
34185      path="${complete%% *}"
34186      tmp="$complete EOL"
34187      arguments="${tmp#* }"
34188
34189      # Cannot rely on the command "which" here since it doesn't always work.
34190      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34191      if test -z "$is_absolute_path"; then
34192        # Path to executable is not absolute. Find it.
34193        IFS_save="$IFS"
34194        IFS=:
34195        for p in $PATH; do
34196          if test -f "$p/$path" && test -x "$p/$path"; then
34197            new_path="$p/$path"
34198            break
34199          fi
34200        done
34201        IFS="$IFS_save"
34202      else
34203        # This is an absolute path, we can use it without further modifications.
34204        new_path="$path"
34205      fi
34206
34207      if test "x$new_path" = x; then
34208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34209$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34210        has_space=`$ECHO "$complete" | $GREP " "`
34211        if test "x$has_space" != x; then
34212          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34214        fi
34215        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34216      fi
34217    fi
34218
34219    # Now join together the path and the arguments once again
34220    if test "x$arguments" != xEOL; then
34221      new_complete="$new_path ${arguments% *}"
34222    else
34223      new_complete="$new_path"
34224    fi
34225
34226    if test "x$complete" != "x$new_complete"; then
34227      PROPER_COMPILER_CXX="$new_complete"
34228      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34229$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34230    fi
34231  fi
34232
34233    PATH="$RETRY_COMPILER_SAVED_PATH"
34234
34235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34236$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34237
34238  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34239    # Follow a chain of symbolic links. Use readlink
34240    # where it exists, else fall back to horribly
34241    # complicated shell code.
34242    if test "x$READLINK_TESTED" != yes; then
34243      # On MacOSX there is a readlink tool with a different
34244      # purpose than the GNU readlink tool. Check the found readlink.
34245      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34246      if test "x$ISGNU" = x; then
34247        # A readlink that we do not know how to use.
34248        # Are there other non-GNU readlinks out there?
34249        READLINK_TESTED=yes
34250        READLINK=
34251      fi
34252    fi
34253
34254    if test "x$READLINK" != x; then
34255      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34256    else
34257      # Save the current directory for restoring afterwards
34258      STARTDIR=$PWD
34259      COUNTER=0
34260      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34261      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34262      cd $sym_link_dir
34263      # Use -P flag to resolve symlinks in directories.
34264      cd `$THEPWDCMD -P`
34265      sym_link_dir=`$THEPWDCMD -P`
34266      # Resolve file symlinks
34267      while test $COUNTER -lt 20; do
34268        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34269        if test "x$ISLINK" == x; then
34270          # This is not a symbolic link! We are done!
34271          break
34272        fi
34273        # Again resolve directory symlinks since the target of the just found
34274        # link could be in a different directory
34275        cd `$DIRNAME $ISLINK`
34276        sym_link_dir=`$THEPWDCMD -P`
34277        sym_link_file=`$BASENAME $ISLINK`
34278        let COUNTER=COUNTER+1
34279      done
34280      cd $STARTDIR
34281      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34282    fi
34283  fi
34284
34285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34286$as_echo "$PROPER_COMPILER_CXX" >&6; }
34287    CXX="$PROPER_COMPILER_CXX"
34288  else
34289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34290$as_echo "no, keeping CXX" >&6; }
34291  fi
34292
34293
34294  COMPILER=$CXX
34295  COMPILER_NAME=$COMPILER_NAME
34296
34297  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34298    # cc -V output typically looks like
34299    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34300    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34301    # Check that this is likely to be the Solaris Studio cc.
34302    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34303    if test $? -ne 0; then
34304      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34305      { $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
34306$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34307      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34308$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34309      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34310$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34311      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34312    fi
34313    # Remove usage instructions (if present), and
34314    # collapse compiler output into a single line
34315    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34316        $SED -e 's/ *[Uu]sage:.*//'`
34317    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34318        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34319  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34320    # xlc -qversion output typically looks like
34321    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34322    #     Version: 11.01.0000.0015
34323    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34324    # Check that this is likely to be the IBM XL C compiler.
34325    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34326    if test $? -ne 0; then
34327      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34328      { $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
34329$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34330      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34331$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34332      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34333$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34334      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34335    fi
34336    # Collapse compiler output into a single line
34337    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34338    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34339        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34340  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34341    # There is no specific version flag, but all output starts with a version string.
34342    # First line typically looks something like:
34343    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34344    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34345    # Check that this is likely to be Microsoft CL.EXE.
34346    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34347    if test $? -ne 0; then
34348      { $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
34349$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34350      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34351$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34352      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34353    fi
34354    # Collapse compiler output into a single line
34355    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34356    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34357        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34358  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34359    # gcc --version output typically looks like
34360    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34361    #     Copyright (C) 2013 Free Software Foundation, Inc.
34362    #     This is free software; see the source for copying conditions.  There is NO
34363    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34364    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34365    # Check that this is likely to be GCC.
34366    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34367    if test $? -ne 0; then
34368      { $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
34369$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34370      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34371$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34372      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34373    fi
34374    # Remove Copyright and legalese from version string, and
34375    # collapse into a single line
34376    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34377        $SED -e 's/ *Copyright .*//'`
34378    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34379        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34380  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34381    # clang --version output typically looks like
34382    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34383    #    clang version 3.3 (tags/RELEASE_33/final)
34384    # or
34385    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34386    #    Target: x86_64-pc-linux-gnu
34387    #    Thread model: posix
34388    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34389    # Check that this is likely to be clang
34390    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34391    if test $? -ne 0; then
34392      { $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
34393$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34394      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34395$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34396      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34397    fi
34398    # Collapse compiler output into a single line
34399    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34400    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34401        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34402  else
34403      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34404  fi
34405  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34406  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34407  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34408  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34409
34410  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34411$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34412
34413
34414  # Now that we have resolved CXX ourself, let autoconf have its go at it
34415  ac_ext=cpp
34416ac_cpp='$CXXCPP $CPPFLAGS'
34417ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34418ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34419ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34420if test -z "$CXX"; then
34421  if test -n "$CCC"; then
34422    CXX=$CCC
34423  else
34424    if test -n "$ac_tool_prefix"; then
34425  for ac_prog in $CXX
34426  do
34427    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34428set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34430$as_echo_n "checking for $ac_word... " >&6; }
34431if ${ac_cv_prog_CXX+:} false; then :
34432  $as_echo_n "(cached) " >&6
34433else
34434  if test -n "$CXX"; then
34435  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34436else
34437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34438for as_dir in $PATH
34439do
34440  IFS=$as_save_IFS
34441  test -z "$as_dir" && as_dir=.
34442    for ac_exec_ext in '' $ac_executable_extensions; do
34443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34444    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34446    break 2
34447  fi
34448done
34449  done
34450IFS=$as_save_IFS
34451
34452fi
34453fi
34454CXX=$ac_cv_prog_CXX
34455if test -n "$CXX"; then
34456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34457$as_echo "$CXX" >&6; }
34458else
34459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34460$as_echo "no" >&6; }
34461fi
34462
34463
34464    test -n "$CXX" && break
34465  done
34466fi
34467if test -z "$CXX"; then
34468  ac_ct_CXX=$CXX
34469  for ac_prog in $CXX
34470do
34471  # Extract the first word of "$ac_prog", so it can be a program name with args.
34472set dummy $ac_prog; ac_word=$2
34473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34474$as_echo_n "checking for $ac_word... " >&6; }
34475if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34476  $as_echo_n "(cached) " >&6
34477else
34478  if test -n "$ac_ct_CXX"; then
34479  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34480else
34481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34482for as_dir in $PATH
34483do
34484  IFS=$as_save_IFS
34485  test -z "$as_dir" && as_dir=.
34486    for ac_exec_ext in '' $ac_executable_extensions; do
34487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34488    ac_cv_prog_ac_ct_CXX="$ac_prog"
34489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34490    break 2
34491  fi
34492done
34493  done
34494IFS=$as_save_IFS
34495
34496fi
34497fi
34498ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34499if test -n "$ac_ct_CXX"; then
34500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34501$as_echo "$ac_ct_CXX" >&6; }
34502else
34503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34504$as_echo "no" >&6; }
34505fi
34506
34507
34508  test -n "$ac_ct_CXX" && break
34509done
34510
34511  if test "x$ac_ct_CXX" = x; then
34512    CXX="g++"
34513  else
34514    case $cross_compiling:$ac_tool_warned in
34515yes:)
34516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34518ac_tool_warned=yes ;;
34519esac
34520    CXX=$ac_ct_CXX
34521  fi
34522fi
34523
34524  fi
34525fi
34526# Provide some information about the compiler.
34527$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34528set X $ac_compile
34529ac_compiler=$2
34530for ac_option in --version -v -V -qversion; do
34531  { { ac_try="$ac_compiler $ac_option >&5"
34532case "(($ac_try" in
34533  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34534  *) ac_try_echo=$ac_try;;
34535esac
34536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34537$as_echo "$ac_try_echo"; } >&5
34538  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34539  ac_status=$?
34540  if test -s conftest.err; then
34541    sed '10a\
34542... rest of stderr output deleted ...
34543         10q' conftest.err >conftest.er1
34544    cat conftest.er1 >&5
34545  fi
34546  rm -f conftest.er1 conftest.err
34547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34548  test $ac_status = 0; }
34549done
34550
34551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34552$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34553if ${ac_cv_cxx_compiler_gnu+:} false; then :
34554  $as_echo_n "(cached) " >&6
34555else
34556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34557/* end confdefs.h.  */
34558
34559int
34560main ()
34561{
34562#ifndef __GNUC__
34563       choke me
34564#endif
34565
34566  ;
34567  return 0;
34568}
34569_ACEOF
34570if ac_fn_cxx_try_compile "$LINENO"; then :
34571  ac_compiler_gnu=yes
34572else
34573  ac_compiler_gnu=no
34574fi
34575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34576ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34577
34578fi
34579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34580$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34581if test $ac_compiler_gnu = yes; then
34582  GXX=yes
34583else
34584  GXX=
34585fi
34586ac_test_CXXFLAGS=${CXXFLAGS+set}
34587ac_save_CXXFLAGS=$CXXFLAGS
34588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34589$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34590if ${ac_cv_prog_cxx_g+:} false; then :
34591  $as_echo_n "(cached) " >&6
34592else
34593  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34594   ac_cxx_werror_flag=yes
34595   ac_cv_prog_cxx_g=no
34596   CXXFLAGS="-g"
34597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34598/* end confdefs.h.  */
34599
34600int
34601main ()
34602{
34603
34604  ;
34605  return 0;
34606}
34607_ACEOF
34608if ac_fn_cxx_try_compile "$LINENO"; then :
34609  ac_cv_prog_cxx_g=yes
34610else
34611  CXXFLAGS=""
34612      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34613/* end confdefs.h.  */
34614
34615int
34616main ()
34617{
34618
34619  ;
34620  return 0;
34621}
34622_ACEOF
34623if ac_fn_cxx_try_compile "$LINENO"; then :
34624
34625else
34626  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34627	 CXXFLAGS="-g"
34628	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34629/* end confdefs.h.  */
34630
34631int
34632main ()
34633{
34634
34635  ;
34636  return 0;
34637}
34638_ACEOF
34639if ac_fn_cxx_try_compile "$LINENO"; then :
34640  ac_cv_prog_cxx_g=yes
34641fi
34642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34643fi
34644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34645fi
34646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34647   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34648fi
34649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34650$as_echo "$ac_cv_prog_cxx_g" >&6; }
34651if test "$ac_test_CXXFLAGS" = set; then
34652  CXXFLAGS=$ac_save_CXXFLAGS
34653elif test $ac_cv_prog_cxx_g = yes; then
34654  if test "$GXX" = yes; then
34655    CXXFLAGS="-g -O2"
34656  else
34657    CXXFLAGS="-g"
34658  fi
34659else
34660  if test "$GXX" = yes; then
34661    CXXFLAGS="-O2"
34662  else
34663    CXXFLAGS=
34664  fi
34665fi
34666ac_ext=cpp
34667ac_cpp='$CXXCPP $CPPFLAGS'
34668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34671
34672
34673  #
34674  # Setup the preprocessor (CPP and CXXCPP)
34675  #
34676  ac_ext=c
34677ac_cpp='$CPP $CPPFLAGS'
34678ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34679ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34680ac_compiler_gnu=$ac_cv_c_compiler_gnu
34681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34682$as_echo_n "checking how to run the C preprocessor... " >&6; }
34683# On Suns, sometimes $CPP names a directory.
34684if test -n "$CPP" && test -d "$CPP"; then
34685  CPP=
34686fi
34687if test -z "$CPP"; then
34688  if ${ac_cv_prog_CPP+:} false; then :
34689  $as_echo_n "(cached) " >&6
34690else
34691      # Double quotes because CPP needs to be expanded
34692    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34693    do
34694      ac_preproc_ok=false
34695for ac_c_preproc_warn_flag in '' yes
34696do
34697  # Use a header file that comes with gcc, so configuring glibc
34698  # with a fresh cross-compiler works.
34699  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34700  # <limits.h> exists even on freestanding compilers.
34701  # On the NeXT, cc -E runs the code through the compiler's parser,
34702  # not just through cpp. "Syntax error" is here to catch this case.
34703  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34704/* end confdefs.h.  */
34705#ifdef __STDC__
34706# include <limits.h>
34707#else
34708# include <assert.h>
34709#endif
34710		     Syntax error
34711_ACEOF
34712if ac_fn_c_try_cpp "$LINENO"; then :
34713
34714else
34715  # Broken: fails on valid input.
34716continue
34717fi
34718rm -f conftest.err conftest.i conftest.$ac_ext
34719
34720  # OK, works on sane cases.  Now check whether nonexistent headers
34721  # can be detected and how.
34722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34723/* end confdefs.h.  */
34724#include <ac_nonexistent.h>
34725_ACEOF
34726if ac_fn_c_try_cpp "$LINENO"; then :
34727  # Broken: success on invalid input.
34728continue
34729else
34730  # Passes both tests.
34731ac_preproc_ok=:
34732break
34733fi
34734rm -f conftest.err conftest.i conftest.$ac_ext
34735
34736done
34737# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34738rm -f conftest.i conftest.err conftest.$ac_ext
34739if $ac_preproc_ok; then :
34740  break
34741fi
34742
34743    done
34744    ac_cv_prog_CPP=$CPP
34745
34746fi
34747  CPP=$ac_cv_prog_CPP
34748else
34749  ac_cv_prog_CPP=$CPP
34750fi
34751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34752$as_echo "$CPP" >&6; }
34753ac_preproc_ok=false
34754for ac_c_preproc_warn_flag in '' yes
34755do
34756  # Use a header file that comes with gcc, so configuring glibc
34757  # with a fresh cross-compiler works.
34758  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34759  # <limits.h> exists even on freestanding compilers.
34760  # On the NeXT, cc -E runs the code through the compiler's parser,
34761  # not just through cpp. "Syntax error" is here to catch this case.
34762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34763/* end confdefs.h.  */
34764#ifdef __STDC__
34765# include <limits.h>
34766#else
34767# include <assert.h>
34768#endif
34769		     Syntax error
34770_ACEOF
34771if ac_fn_c_try_cpp "$LINENO"; then :
34772
34773else
34774  # Broken: fails on valid input.
34775continue
34776fi
34777rm -f conftest.err conftest.i conftest.$ac_ext
34778
34779  # OK, works on sane cases.  Now check whether nonexistent headers
34780  # can be detected and how.
34781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34782/* end confdefs.h.  */
34783#include <ac_nonexistent.h>
34784_ACEOF
34785if ac_fn_c_try_cpp "$LINENO"; then :
34786  # Broken: success on invalid input.
34787continue
34788else
34789  # Passes both tests.
34790ac_preproc_ok=:
34791break
34792fi
34793rm -f conftest.err conftest.i conftest.$ac_ext
34794
34795done
34796# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34797rm -f conftest.i conftest.err conftest.$ac_ext
34798if $ac_preproc_ok; then :
34799
34800else
34801  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34803as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34804See \`config.log' for more details" "$LINENO" 5; }
34805fi
34806
34807ac_ext=cpp
34808ac_cpp='$CXXCPP $CPPFLAGS'
34809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34812
34813
34814  # Only process if variable expands to non-empty
34815
34816  if test "x$CPP" != x; then
34817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34818
34819  # First separate the path from the arguments. This will split at the first
34820  # space.
34821  complete="$CPP"
34822  path="${complete%% *}"
34823  tmp="$complete EOL"
34824  arguments="${tmp#* }"
34825
34826  # Input might be given as Windows format, start by converting to
34827  # unix format.
34828  new_path=`$CYGPATH -u "$path"`
34829
34830  # Now try to locate executable using which
34831  new_path=`$WHICH "$new_path" 2> /dev/null`
34832  # bat and cmd files are not always considered executable in cygwin causing which
34833  # to not find them
34834  if test "x$new_path" = x \
34835      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34836      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34837    new_path=`$CYGPATH -u "$path"`
34838  fi
34839  if test "x$new_path" = x; then
34840    # Oops. Which didn't find the executable.
34841    # The splitting of arguments from the executable at a space might have been incorrect,
34842    # since paths with space are more likely in Windows. Give it another try with the whole
34843    # argument.
34844    path="$complete"
34845    arguments="EOL"
34846    new_path=`$CYGPATH -u "$path"`
34847    new_path=`$WHICH "$new_path" 2> /dev/null`
34848    # bat and cmd files are not always considered executable in cygwin causing which
34849    # to not find them
34850    if test "x$new_path" = x \
34851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34853      new_path=`$CYGPATH -u "$path"`
34854    fi
34855    if test "x$new_path" = x; then
34856      # It's still not found. Now this is an unrecoverable error.
34857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34858$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34859      has_space=`$ECHO "$complete" | $GREP " "`
34860      if test "x$has_space" != x; then
34861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34863      fi
34864      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34865    fi
34866  fi
34867
34868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34871  # "foo.exe" is OK but "foo" is an error.
34872  #
34873  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34874  # It is also a way to make sure we got the proper file name for the real test later on.
34875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34876  if test "x$test_shortpath" = x; then
34877    # Short path failed, file does not exist as specified.
34878    # Try adding .exe or .cmd
34879    if test -f "${new_path}.exe"; then
34880      input_to_shortpath="${new_path}.exe"
34881    elif test -f "${new_path}.cmd"; then
34882      input_to_shortpath="${new_path}.cmd"
34883    else
34884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34885$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34886      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34888      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34889    fi
34890  else
34891    input_to_shortpath="$new_path"
34892  fi
34893
34894  # Call helper function which possibly converts this using DOS-style short mode.
34895  # If so, the updated path is stored in $new_path.
34896  new_path="$input_to_shortpath"
34897
34898  input_path="$input_to_shortpath"
34899  # Check if we need to convert this using DOS-style short mode. If the path
34900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34901  # take no chances and rewrite it.
34902  # Note: m4 eats our [], so we need to use [ and ] instead.
34903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34904  if test "x$has_forbidden_chars" != x; then
34905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34909      # Going to short mode and back again did indeed matter. Since short mode is
34910      # case insensitive, let's make it lowercase to improve readability.
34911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34912      # Now convert it back to Unix-style (cygpath)
34913      input_path=`$CYGPATH -u "$shortmode_path"`
34914      new_path="$input_path"
34915    fi
34916  fi
34917
34918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34919  if test "x$test_cygdrive_prefix" = x; then
34920    # As a simple fix, exclude /usr/bin since it's not a real path.
34921    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34923      # a path prefixed by /cygdrive for fixpath to work.
34924      new_path="$CYGWIN_ROOT_PATH$input_path"
34925    fi
34926  fi
34927
34928  # remove trailing .exe if any
34929  new_path="${new_path/%.exe/}"
34930
34931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34932
34933  # First separate the path from the arguments. This will split at the first
34934  # space.
34935  complete="$CPP"
34936  path="${complete%% *}"
34937  tmp="$complete EOL"
34938  arguments="${tmp#* }"
34939
34940  # Input might be given as Windows format, start by converting to
34941  # unix format.
34942  new_path="$path"
34943
34944  windows_path="$new_path"
34945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34946    unix_path=`$CYGPATH -u "$windows_path"`
34947    new_path="$unix_path"
34948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34950    new_path="$unix_path"
34951  fi
34952
34953
34954  # Now try to locate executable using which
34955  new_path=`$WHICH "$new_path" 2> /dev/null`
34956
34957  if test "x$new_path" = x; then
34958    # Oops. Which didn't find the executable.
34959    # The splitting of arguments from the executable at a space might have been incorrect,
34960    # since paths with space are more likely in Windows. Give it another try with the whole
34961    # argument.
34962    path="$complete"
34963    arguments="EOL"
34964    new_path="$path"
34965
34966  windows_path="$new_path"
34967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34968    unix_path=`$CYGPATH -u "$windows_path"`
34969    new_path="$unix_path"
34970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34972    new_path="$unix_path"
34973  fi
34974
34975
34976    new_path=`$WHICH "$new_path" 2> /dev/null`
34977    # bat and cmd files are not always considered executable in MSYS causing which
34978    # to not find them
34979    if test "x$new_path" = x \
34980        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34981        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34982      new_path="$path"
34983
34984  windows_path="$new_path"
34985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34986    unix_path=`$CYGPATH -u "$windows_path"`
34987    new_path="$unix_path"
34988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34990    new_path="$unix_path"
34991  fi
34992
34993    fi
34994
34995    if test "x$new_path" = x; then
34996      # It's still not found. Now this is an unrecoverable error.
34997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34998$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34999      has_space=`$ECHO "$complete" | $GREP " "`
35000      if test "x$has_space" != x; then
35001        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35002$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35003      fi
35004      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35005    fi
35006  fi
35007
35008  # Now new_path has a complete unix path to the binary
35009  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35010    # Keep paths in /bin as-is, but remove trailing .exe if any
35011    new_path="${new_path/%.exe/}"
35012    # Do not save /bin paths to all_fixpath_prefixes!
35013  else
35014    # Not in mixed or Windows style, start by that.
35015    new_path=`cmd //c echo $new_path`
35016
35017  input_path="$new_path"
35018  # Check if we need to convert this using DOS-style short mode. If the path
35019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35020  # take no chances and rewrite it.
35021  # Note: m4 eats our [], so we need to use [ and ] instead.
35022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35023  if test "x$has_forbidden_chars" != x; then
35024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35026  fi
35027
35028    # Output is in $new_path
35029
35030  windows_path="$new_path"
35031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35032    unix_path=`$CYGPATH -u "$windows_path"`
35033    new_path="$unix_path"
35034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35036    new_path="$unix_path"
35037  fi
35038
35039    # remove trailing .exe if any
35040    new_path="${new_path/%.exe/}"
35041
35042    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35043    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35044  fi
35045
35046    else
35047      # We're on a unix platform. Hooray! :)
35048      # First separate the path from the arguments. This will split at the first
35049      # space.
35050      complete="$CPP"
35051      path="${complete%% *}"
35052      tmp="$complete EOL"
35053      arguments="${tmp#* }"
35054
35055      # Cannot rely on the command "which" here since it doesn't always work.
35056      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35057      if test -z "$is_absolute_path"; then
35058        # Path to executable is not absolute. Find it.
35059        IFS_save="$IFS"
35060        IFS=:
35061        for p in $PATH; do
35062          if test -f "$p/$path" && test -x "$p/$path"; then
35063            new_path="$p/$path"
35064            break
35065          fi
35066        done
35067        IFS="$IFS_save"
35068      else
35069        # This is an absolute path, we can use it without further modifications.
35070        new_path="$path"
35071      fi
35072
35073      if test "x$new_path" = x; then
35074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35075$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35076        has_space=`$ECHO "$complete" | $GREP " "`
35077        if test "x$has_space" != x; then
35078          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35079$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35080        fi
35081        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35082      fi
35083    fi
35084
35085    # Now join together the path and the arguments once again
35086    if test "x$arguments" != xEOL; then
35087      new_complete="$new_path ${arguments% *}"
35088    else
35089      new_complete="$new_path"
35090    fi
35091
35092    if test "x$complete" != "x$new_complete"; then
35093      CPP="$new_complete"
35094      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35095$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35096    fi
35097  fi
35098
35099  ac_ext=cpp
35100ac_cpp='$CXXCPP $CPPFLAGS'
35101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35105$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35106if test -z "$CXXCPP"; then
35107  if ${ac_cv_prog_CXXCPP+:} false; then :
35108  $as_echo_n "(cached) " >&6
35109else
35110      # Double quotes because CXXCPP needs to be expanded
35111    for CXXCPP in "$CXX -E" "/lib/cpp"
35112    do
35113      ac_preproc_ok=false
35114for ac_cxx_preproc_warn_flag in '' yes
35115do
35116  # Use a header file that comes with gcc, so configuring glibc
35117  # with a fresh cross-compiler works.
35118  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35119  # <limits.h> exists even on freestanding compilers.
35120  # On the NeXT, cc -E runs the code through the compiler's parser,
35121  # not just through cpp. "Syntax error" is here to catch this case.
35122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35123/* end confdefs.h.  */
35124#ifdef __STDC__
35125# include <limits.h>
35126#else
35127# include <assert.h>
35128#endif
35129		     Syntax error
35130_ACEOF
35131if ac_fn_cxx_try_cpp "$LINENO"; then :
35132
35133else
35134  # Broken: fails on valid input.
35135continue
35136fi
35137rm -f conftest.err conftest.i conftest.$ac_ext
35138
35139  # OK, works on sane cases.  Now check whether nonexistent headers
35140  # can be detected and how.
35141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35142/* end confdefs.h.  */
35143#include <ac_nonexistent.h>
35144_ACEOF
35145if ac_fn_cxx_try_cpp "$LINENO"; then :
35146  # Broken: success on invalid input.
35147continue
35148else
35149  # Passes both tests.
35150ac_preproc_ok=:
35151break
35152fi
35153rm -f conftest.err conftest.i conftest.$ac_ext
35154
35155done
35156# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35157rm -f conftest.i conftest.err conftest.$ac_ext
35158if $ac_preproc_ok; then :
35159  break
35160fi
35161
35162    done
35163    ac_cv_prog_CXXCPP=$CXXCPP
35164
35165fi
35166  CXXCPP=$ac_cv_prog_CXXCPP
35167else
35168  ac_cv_prog_CXXCPP=$CXXCPP
35169fi
35170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35171$as_echo "$CXXCPP" >&6; }
35172ac_preproc_ok=false
35173for ac_cxx_preproc_warn_flag in '' yes
35174do
35175  # Use a header file that comes with gcc, so configuring glibc
35176  # with a fresh cross-compiler works.
35177  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35178  # <limits.h> exists even on freestanding compilers.
35179  # On the NeXT, cc -E runs the code through the compiler's parser,
35180  # not just through cpp. "Syntax error" is here to catch this case.
35181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35182/* end confdefs.h.  */
35183#ifdef __STDC__
35184# include <limits.h>
35185#else
35186# include <assert.h>
35187#endif
35188		     Syntax error
35189_ACEOF
35190if ac_fn_cxx_try_cpp "$LINENO"; then :
35191
35192else
35193  # Broken: fails on valid input.
35194continue
35195fi
35196rm -f conftest.err conftest.i conftest.$ac_ext
35197
35198  # OK, works on sane cases.  Now check whether nonexistent headers
35199  # can be detected and how.
35200  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35201/* end confdefs.h.  */
35202#include <ac_nonexistent.h>
35203_ACEOF
35204if ac_fn_cxx_try_cpp "$LINENO"; then :
35205  # Broken: success on invalid input.
35206continue
35207else
35208  # Passes both tests.
35209ac_preproc_ok=:
35210break
35211fi
35212rm -f conftest.err conftest.i conftest.$ac_ext
35213
35214done
35215# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35216rm -f conftest.i conftest.err conftest.$ac_ext
35217if $ac_preproc_ok; then :
35218
35219else
35220  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35222as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35223See \`config.log' for more details" "$LINENO" 5; }
35224fi
35225
35226ac_ext=cpp
35227ac_cpp='$CXXCPP $CPPFLAGS'
35228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35231
35232
35233  # Only process if variable expands to non-empty
35234
35235  if test "x$CXXCPP" != x; then
35236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35237
35238  # First separate the path from the arguments. This will split at the first
35239  # space.
35240  complete="$CXXCPP"
35241  path="${complete%% *}"
35242  tmp="$complete EOL"
35243  arguments="${tmp#* }"
35244
35245  # Input might be given as Windows format, start by converting to
35246  # unix format.
35247  new_path=`$CYGPATH -u "$path"`
35248
35249  # Now try to locate executable using which
35250  new_path=`$WHICH "$new_path" 2> /dev/null`
35251  # bat and cmd files are not always considered executable in cygwin causing which
35252  # to not find them
35253  if test "x$new_path" = x \
35254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35256    new_path=`$CYGPATH -u "$path"`
35257  fi
35258  if test "x$new_path" = x; then
35259    # Oops. Which didn't find the executable.
35260    # The splitting of arguments from the executable at a space might have been incorrect,
35261    # since paths with space are more likely in Windows. Give it another try with the whole
35262    # argument.
35263    path="$complete"
35264    arguments="EOL"
35265    new_path=`$CYGPATH -u "$path"`
35266    new_path=`$WHICH "$new_path" 2> /dev/null`
35267    # bat and cmd files are not always considered executable in cygwin causing which
35268    # to not find them
35269    if test "x$new_path" = x \
35270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35272      new_path=`$CYGPATH -u "$path"`
35273    fi
35274    if test "x$new_path" = x; then
35275      # It's still not found. Now this is an unrecoverable error.
35276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35277$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35278      has_space=`$ECHO "$complete" | $GREP " "`
35279      if test "x$has_space" != x; then
35280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35282      fi
35283      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35284    fi
35285  fi
35286
35287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35290  # "foo.exe" is OK but "foo" is an error.
35291  #
35292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35293  # It is also a way to make sure we got the proper file name for the real test later on.
35294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35295  if test "x$test_shortpath" = x; then
35296    # Short path failed, file does not exist as specified.
35297    # Try adding .exe or .cmd
35298    if test -f "${new_path}.exe"; then
35299      input_to_shortpath="${new_path}.exe"
35300    elif test -f "${new_path}.cmd"; then
35301      input_to_shortpath="${new_path}.cmd"
35302    else
35303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35304$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35307      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35308    fi
35309  else
35310    input_to_shortpath="$new_path"
35311  fi
35312
35313  # Call helper function which possibly converts this using DOS-style short mode.
35314  # If so, the updated path is stored in $new_path.
35315  new_path="$input_to_shortpath"
35316
35317  input_path="$input_to_shortpath"
35318  # Check if we need to convert this using DOS-style short mode. If the path
35319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35320  # take no chances and rewrite it.
35321  # Note: m4 eats our [], so we need to use [ and ] instead.
35322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35323  if test "x$has_forbidden_chars" != x; then
35324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35328      # Going to short mode and back again did indeed matter. Since short mode is
35329      # case insensitive, let's make it lowercase to improve readability.
35330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35331      # Now convert it back to Unix-style (cygpath)
35332      input_path=`$CYGPATH -u "$shortmode_path"`
35333      new_path="$input_path"
35334    fi
35335  fi
35336
35337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35338  if test "x$test_cygdrive_prefix" = x; then
35339    # As a simple fix, exclude /usr/bin since it's not a real path.
35340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35342      # a path prefixed by /cygdrive for fixpath to work.
35343      new_path="$CYGWIN_ROOT_PATH$input_path"
35344    fi
35345  fi
35346
35347  # remove trailing .exe if any
35348  new_path="${new_path/%.exe/}"
35349
35350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35351
35352  # First separate the path from the arguments. This will split at the first
35353  # space.
35354  complete="$CXXCPP"
35355  path="${complete%% *}"
35356  tmp="$complete EOL"
35357  arguments="${tmp#* }"
35358
35359  # Input might be given as Windows format, start by converting to
35360  # unix format.
35361  new_path="$path"
35362
35363  windows_path="$new_path"
35364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35365    unix_path=`$CYGPATH -u "$windows_path"`
35366    new_path="$unix_path"
35367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35369    new_path="$unix_path"
35370  fi
35371
35372
35373  # Now try to locate executable using which
35374  new_path=`$WHICH "$new_path" 2> /dev/null`
35375
35376  if test "x$new_path" = x; then
35377    # Oops. Which didn't find the executable.
35378    # The splitting of arguments from the executable at a space might have been incorrect,
35379    # since paths with space are more likely in Windows. Give it another try with the whole
35380    # argument.
35381    path="$complete"
35382    arguments="EOL"
35383    new_path="$path"
35384
35385  windows_path="$new_path"
35386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35387    unix_path=`$CYGPATH -u "$windows_path"`
35388    new_path="$unix_path"
35389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35391    new_path="$unix_path"
35392  fi
35393
35394
35395    new_path=`$WHICH "$new_path" 2> /dev/null`
35396    # bat and cmd files are not always considered executable in MSYS causing which
35397    # to not find them
35398    if test "x$new_path" = x \
35399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35401      new_path="$path"
35402
35403  windows_path="$new_path"
35404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35405    unix_path=`$CYGPATH -u "$windows_path"`
35406    new_path="$unix_path"
35407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35409    new_path="$unix_path"
35410  fi
35411
35412    fi
35413
35414    if test "x$new_path" = x; then
35415      # It's still not found. Now this is an unrecoverable error.
35416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35417$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35418      has_space=`$ECHO "$complete" | $GREP " "`
35419      if test "x$has_space" != x; then
35420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35422      fi
35423      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35424    fi
35425  fi
35426
35427  # Now new_path has a complete unix path to the binary
35428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35429    # Keep paths in /bin as-is, but remove trailing .exe if any
35430    new_path="${new_path/%.exe/}"
35431    # Do not save /bin paths to all_fixpath_prefixes!
35432  else
35433    # Not in mixed or Windows style, start by that.
35434    new_path=`cmd //c echo $new_path`
35435
35436  input_path="$new_path"
35437  # Check if we need to convert this using DOS-style short mode. If the path
35438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35439  # take no chances and rewrite it.
35440  # Note: m4 eats our [], so we need to use [ and ] instead.
35441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35442  if test "x$has_forbidden_chars" != x; then
35443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35445  fi
35446
35447    # Output is in $new_path
35448
35449  windows_path="$new_path"
35450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35451    unix_path=`$CYGPATH -u "$windows_path"`
35452    new_path="$unix_path"
35453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35455    new_path="$unix_path"
35456  fi
35457
35458    # remove trailing .exe if any
35459    new_path="${new_path/%.exe/}"
35460
35461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35463  fi
35464
35465    else
35466      # We're on a unix platform. Hooray! :)
35467      # First separate the path from the arguments. This will split at the first
35468      # space.
35469      complete="$CXXCPP"
35470      path="${complete%% *}"
35471      tmp="$complete EOL"
35472      arguments="${tmp#* }"
35473
35474      # Cannot rely on the command "which" here since it doesn't always work.
35475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35476      if test -z "$is_absolute_path"; then
35477        # Path to executable is not absolute. Find it.
35478        IFS_save="$IFS"
35479        IFS=:
35480        for p in $PATH; do
35481          if test -f "$p/$path" && test -x "$p/$path"; then
35482            new_path="$p/$path"
35483            break
35484          fi
35485        done
35486        IFS="$IFS_save"
35487      else
35488        # This is an absolute path, we can use it without further modifications.
35489        new_path="$path"
35490      fi
35491
35492      if test "x$new_path" = x; then
35493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35494$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35495        has_space=`$ECHO "$complete" | $GREP " "`
35496        if test "x$has_space" != x; then
35497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35499        fi
35500        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35501      fi
35502    fi
35503
35504    # Now join together the path and the arguments once again
35505    if test "x$arguments" != xEOL; then
35506      new_complete="$new_path ${arguments% *}"
35507    else
35508      new_complete="$new_path"
35509    fi
35510
35511    if test "x$complete" != "x$new_complete"; then
35512      CXXCPP="$new_complete"
35513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35514$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35515    fi
35516  fi
35517
35518
35519  #
35520  # Setup the linker (LD)
35521  #
35522  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35523    # In the Microsoft toolchain we have a separate LD command "link".
35524    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35525    # a cygwin program for something completely different.
35526    # Extract the first word of "link", so it can be a program name with args.
35527set dummy link; ac_word=$2
35528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35529$as_echo_n "checking for $ac_word... " >&6; }
35530if ${ac_cv_prog_LD+:} false; then :
35531  $as_echo_n "(cached) " >&6
35532else
35533  if test -n "$LD"; then
35534  ac_cv_prog_LD="$LD" # Let the user override the test.
35535else
35536  ac_prog_rejected=no
35537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35538for as_dir in $PATH
35539do
35540  IFS=$as_save_IFS
35541  test -z "$as_dir" && as_dir=.
35542    for ac_exec_ext in '' $ac_executable_extensions; do
35543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35544    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35545       ac_prog_rejected=yes
35546       continue
35547     fi
35548    ac_cv_prog_LD="link"
35549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35550    break 2
35551  fi
35552done
35553  done
35554IFS=$as_save_IFS
35555
35556if test $ac_prog_rejected = yes; then
35557  # We found a bogon in the path, so make sure we never use it.
35558  set dummy $ac_cv_prog_LD
35559  shift
35560  if test $# != 0; then
35561    # We chose a different compiler from the bogus one.
35562    # However, it has the same basename, so the bogon will be chosen
35563    # first if we set LD to just the basename; use the full file name.
35564    shift
35565    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35566  fi
35567fi
35568fi
35569fi
35570LD=$ac_cv_prog_LD
35571if test -n "$LD"; then
35572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35573$as_echo "$LD" >&6; }
35574else
35575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35576$as_echo "no" >&6; }
35577fi
35578
35579
35580
35581  # Only process if variable expands to non-empty
35582
35583  if test "x$LD" != x; then
35584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35585
35586  # First separate the path from the arguments. This will split at the first
35587  # space.
35588  complete="$LD"
35589  path="${complete%% *}"
35590  tmp="$complete EOL"
35591  arguments="${tmp#* }"
35592
35593  # Input might be given as Windows format, start by converting to
35594  # unix format.
35595  new_path=`$CYGPATH -u "$path"`
35596
35597  # Now try to locate executable using which
35598  new_path=`$WHICH "$new_path" 2> /dev/null`
35599  # bat and cmd files are not always considered executable in cygwin causing which
35600  # to not find them
35601  if test "x$new_path" = x \
35602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35604    new_path=`$CYGPATH -u "$path"`
35605  fi
35606  if test "x$new_path" = x; then
35607    # Oops. Which didn't find the executable.
35608    # The splitting of arguments from the executable at a space might have been incorrect,
35609    # since paths with space are more likely in Windows. Give it another try with the whole
35610    # argument.
35611    path="$complete"
35612    arguments="EOL"
35613    new_path=`$CYGPATH -u "$path"`
35614    new_path=`$WHICH "$new_path" 2> /dev/null`
35615    # bat and cmd files are not always considered executable in cygwin causing which
35616    # to not find them
35617    if test "x$new_path" = x \
35618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35620      new_path=`$CYGPATH -u "$path"`
35621    fi
35622    if test "x$new_path" = x; then
35623      # It's still not found. Now this is an unrecoverable error.
35624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35625$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35626      has_space=`$ECHO "$complete" | $GREP " "`
35627      if test "x$has_space" != x; then
35628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35630      fi
35631      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35632    fi
35633  fi
35634
35635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35638  # "foo.exe" is OK but "foo" is an error.
35639  #
35640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35641  # It is also a way to make sure we got the proper file name for the real test later on.
35642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35643  if test "x$test_shortpath" = x; then
35644    # Short path failed, file does not exist as specified.
35645    # Try adding .exe or .cmd
35646    if test -f "${new_path}.exe"; then
35647      input_to_shortpath="${new_path}.exe"
35648    elif test -f "${new_path}.cmd"; then
35649      input_to_shortpath="${new_path}.cmd"
35650    else
35651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35652$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35655      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35656    fi
35657  else
35658    input_to_shortpath="$new_path"
35659  fi
35660
35661  # Call helper function which possibly converts this using DOS-style short mode.
35662  # If so, the updated path is stored in $new_path.
35663  new_path="$input_to_shortpath"
35664
35665  input_path="$input_to_shortpath"
35666  # Check if we need to convert this using DOS-style short mode. If the path
35667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35668  # take no chances and rewrite it.
35669  # Note: m4 eats our [], so we need to use [ and ] instead.
35670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35671  if test "x$has_forbidden_chars" != x; then
35672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35676      # Going to short mode and back again did indeed matter. Since short mode is
35677      # case insensitive, let's make it lowercase to improve readability.
35678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35679      # Now convert it back to Unix-style (cygpath)
35680      input_path=`$CYGPATH -u "$shortmode_path"`
35681      new_path="$input_path"
35682    fi
35683  fi
35684
35685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35686  if test "x$test_cygdrive_prefix" = x; then
35687    # As a simple fix, exclude /usr/bin since it's not a real path.
35688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35690      # a path prefixed by /cygdrive for fixpath to work.
35691      new_path="$CYGWIN_ROOT_PATH$input_path"
35692    fi
35693  fi
35694
35695  # remove trailing .exe if any
35696  new_path="${new_path/%.exe/}"
35697
35698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35699
35700  # First separate the path from the arguments. This will split at the first
35701  # space.
35702  complete="$LD"
35703  path="${complete%% *}"
35704  tmp="$complete EOL"
35705  arguments="${tmp#* }"
35706
35707  # Input might be given as Windows format, start by converting to
35708  # unix format.
35709  new_path="$path"
35710
35711  windows_path="$new_path"
35712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35713    unix_path=`$CYGPATH -u "$windows_path"`
35714    new_path="$unix_path"
35715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35717    new_path="$unix_path"
35718  fi
35719
35720
35721  # Now try to locate executable using which
35722  new_path=`$WHICH "$new_path" 2> /dev/null`
35723
35724  if test "x$new_path" = x; then
35725    # Oops. Which didn't find the executable.
35726    # The splitting of arguments from the executable at a space might have been incorrect,
35727    # since paths with space are more likely in Windows. Give it another try with the whole
35728    # argument.
35729    path="$complete"
35730    arguments="EOL"
35731    new_path="$path"
35732
35733  windows_path="$new_path"
35734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35735    unix_path=`$CYGPATH -u "$windows_path"`
35736    new_path="$unix_path"
35737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35739    new_path="$unix_path"
35740  fi
35741
35742
35743    new_path=`$WHICH "$new_path" 2> /dev/null`
35744    # bat and cmd files are not always considered executable in MSYS causing which
35745    # to not find them
35746    if test "x$new_path" = x \
35747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35749      new_path="$path"
35750
35751  windows_path="$new_path"
35752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35753    unix_path=`$CYGPATH -u "$windows_path"`
35754    new_path="$unix_path"
35755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35757    new_path="$unix_path"
35758  fi
35759
35760    fi
35761
35762    if test "x$new_path" = x; then
35763      # It's still not found. Now this is an unrecoverable error.
35764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35765$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35766      has_space=`$ECHO "$complete" | $GREP " "`
35767      if test "x$has_space" != x; then
35768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35770      fi
35771      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35772    fi
35773  fi
35774
35775  # Now new_path has a complete unix path to the binary
35776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35777    # Keep paths in /bin as-is, but remove trailing .exe if any
35778    new_path="${new_path/%.exe/}"
35779    # Do not save /bin paths to all_fixpath_prefixes!
35780  else
35781    # Not in mixed or Windows style, start by that.
35782    new_path=`cmd //c echo $new_path`
35783
35784  input_path="$new_path"
35785  # Check if we need to convert this using DOS-style short mode. If the path
35786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35787  # take no chances and rewrite it.
35788  # Note: m4 eats our [], so we need to use [ and ] instead.
35789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35790  if test "x$has_forbidden_chars" != x; then
35791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35793  fi
35794
35795    # Output is in $new_path
35796
35797  windows_path="$new_path"
35798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35799    unix_path=`$CYGPATH -u "$windows_path"`
35800    new_path="$unix_path"
35801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35803    new_path="$unix_path"
35804  fi
35805
35806    # remove trailing .exe if any
35807    new_path="${new_path/%.exe/}"
35808
35809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35811  fi
35812
35813    else
35814      # We're on a unix platform. Hooray! :)
35815      # First separate the path from the arguments. This will split at the first
35816      # space.
35817      complete="$LD"
35818      path="${complete%% *}"
35819      tmp="$complete EOL"
35820      arguments="${tmp#* }"
35821
35822      # Cannot rely on the command "which" here since it doesn't always work.
35823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35824      if test -z "$is_absolute_path"; then
35825        # Path to executable is not absolute. Find it.
35826        IFS_save="$IFS"
35827        IFS=:
35828        for p in $PATH; do
35829          if test -f "$p/$path" && test -x "$p/$path"; then
35830            new_path="$p/$path"
35831            break
35832          fi
35833        done
35834        IFS="$IFS_save"
35835      else
35836        # This is an absolute path, we can use it without further modifications.
35837        new_path="$path"
35838      fi
35839
35840      if test "x$new_path" = x; then
35841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35842$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35843        has_space=`$ECHO "$complete" | $GREP " "`
35844        if test "x$has_space" != x; then
35845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35847        fi
35848        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35849      fi
35850    fi
35851
35852    # Now join together the path and the arguments once again
35853    if test "x$arguments" != xEOL; then
35854      new_complete="$new_path ${arguments% *}"
35855    else
35856      new_complete="$new_path"
35857    fi
35858
35859    if test "x$complete" != "x$new_complete"; then
35860      LD="$new_complete"
35861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35862$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35863    fi
35864  fi
35865
35866    # Verify that we indeed succeeded with this trick.
35867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35868$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35869    "$LD" --version > /dev/null
35870    if test $? -eq 0 ; then
35871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35872$as_echo "no" >&6; }
35873      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35874    else
35875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35876$as_echo "yes" >&6; }
35877    fi
35878    LDCXX="$LD"
35879  else
35880    # All other toolchains use the compiler to link.
35881    LD="$CC"
35882    LDCXX="$CXX"
35883  fi
35884
35885  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35886
35887
35888  #
35889  # Setup the assembler (AS)
35890  #
35891  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35892    # FIXME: should this really be solaris, or solstudio?
35893
35894
35895  # Publish this variable in the help.
35896
35897
35898  if [ -z "${AS+x}" ]; then
35899    # The variable is not set by user, try to locate tool using the code snippet
35900    for ac_prog in as
35901do
35902  # Extract the first word of "$ac_prog", so it can be a program name with args.
35903set dummy $ac_prog; ac_word=$2
35904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35905$as_echo_n "checking for $ac_word... " >&6; }
35906if ${ac_cv_path_AS+:} false; then :
35907  $as_echo_n "(cached) " >&6
35908else
35909  case $AS in
35910  [\\/]* | ?:[\\/]*)
35911  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35912  ;;
35913  *)
35914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35915for as_dir in $PATH
35916do
35917  IFS=$as_save_IFS
35918  test -z "$as_dir" && as_dir=.
35919    for ac_exec_ext in '' $ac_executable_extensions; do
35920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35921    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35923    break 2
35924  fi
35925done
35926  done
35927IFS=$as_save_IFS
35928
35929  ;;
35930esac
35931fi
35932AS=$ac_cv_path_AS
35933if test -n "$AS"; then
35934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35935$as_echo "$AS" >&6; }
35936else
35937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35938$as_echo "no" >&6; }
35939fi
35940
35941
35942  test -n "$AS" && break
35943done
35944
35945  else
35946    # The variable is set, but is it from the command line or the environment?
35947
35948    # Try to remove the string !AS! from our list.
35949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35951      # If it failed, the variable was not from the command line. Ignore it,
35952      # but warn the user (except for BASH, which is always set by the calling BASH).
35953      if test "xAS" != xBASH; then
35954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35955$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35956      fi
35957      # Try to locate tool using the code snippet
35958      for ac_prog in as
35959do
35960  # Extract the first word of "$ac_prog", so it can be a program name with args.
35961set dummy $ac_prog; ac_word=$2
35962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35963$as_echo_n "checking for $ac_word... " >&6; }
35964if ${ac_cv_path_AS+:} false; then :
35965  $as_echo_n "(cached) " >&6
35966else
35967  case $AS in
35968  [\\/]* | ?:[\\/]*)
35969  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35970  ;;
35971  *)
35972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35973for as_dir in $PATH
35974do
35975  IFS=$as_save_IFS
35976  test -z "$as_dir" && as_dir=.
35977    for ac_exec_ext in '' $ac_executable_extensions; do
35978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35979    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35981    break 2
35982  fi
35983done
35984  done
35985IFS=$as_save_IFS
35986
35987  ;;
35988esac
35989fi
35990AS=$ac_cv_path_AS
35991if test -n "$AS"; then
35992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35993$as_echo "$AS" >&6; }
35994else
35995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35996$as_echo "no" >&6; }
35997fi
35998
35999
36000  test -n "$AS" && break
36001done
36002
36003    else
36004      # If it succeeded, then it was overridden by the user. We will use it
36005      # for the tool.
36006
36007      # First remove it from the list of overridden variables, so we can test
36008      # for unknown variables in the end.
36009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36010
36011      # Check if we try to supply an empty value
36012      if test "x$AS" = x; then
36013        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36014$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36016$as_echo_n "checking for AS... " >&6; }
36017        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36018$as_echo "disabled" >&6; }
36019      else
36020        # Check if the provided tool contains a complete path.
36021        tool_specified="$AS"
36022        tool_basename="${tool_specified##*/}"
36023        if test "x$tool_basename" = "x$tool_specified"; then
36024          # A command without a complete path is provided, search $PATH.
36025          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36026$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36027          # Extract the first word of "$tool_basename", so it can be a program name with args.
36028set dummy $tool_basename; ac_word=$2
36029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36030$as_echo_n "checking for $ac_word... " >&6; }
36031if ${ac_cv_path_AS+:} false; then :
36032  $as_echo_n "(cached) " >&6
36033else
36034  case $AS in
36035  [\\/]* | ?:[\\/]*)
36036  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36037  ;;
36038  *)
36039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36040for as_dir in $PATH
36041do
36042  IFS=$as_save_IFS
36043  test -z "$as_dir" && as_dir=.
36044    for ac_exec_ext in '' $ac_executable_extensions; do
36045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36046    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36048    break 2
36049  fi
36050done
36051  done
36052IFS=$as_save_IFS
36053
36054  ;;
36055esac
36056fi
36057AS=$ac_cv_path_AS
36058if test -n "$AS"; then
36059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36060$as_echo "$AS" >&6; }
36061else
36062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36063$as_echo "no" >&6; }
36064fi
36065
36066
36067          if test "x$AS" = x; then
36068            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36069          fi
36070        else
36071          # Otherwise we believe it is a complete path. Use it as it is.
36072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36073$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36074          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36075$as_echo_n "checking for AS... " >&6; }
36076          if test ! -x "$tool_specified"; then
36077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36078$as_echo "not found" >&6; }
36079            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36080          fi
36081          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36082$as_echo "$tool_specified" >&6; }
36083        fi
36084      fi
36085    fi
36086
36087  fi
36088
36089
36090
36091  # Only process if variable expands to non-empty
36092
36093  if test "x$AS" != x; then
36094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36095
36096  # First separate the path from the arguments. This will split at the first
36097  # space.
36098  complete="$AS"
36099  path="${complete%% *}"
36100  tmp="$complete EOL"
36101  arguments="${tmp#* }"
36102
36103  # Input might be given as Windows format, start by converting to
36104  # unix format.
36105  new_path=`$CYGPATH -u "$path"`
36106
36107  # Now try to locate executable using which
36108  new_path=`$WHICH "$new_path" 2> /dev/null`
36109  # bat and cmd files are not always considered executable in cygwin causing which
36110  # to not find them
36111  if test "x$new_path" = x \
36112      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36113      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36114    new_path=`$CYGPATH -u "$path"`
36115  fi
36116  if test "x$new_path" = x; then
36117    # Oops. Which didn't find the executable.
36118    # The splitting of arguments from the executable at a space might have been incorrect,
36119    # since paths with space are more likely in Windows. Give it another try with the whole
36120    # argument.
36121    path="$complete"
36122    arguments="EOL"
36123    new_path=`$CYGPATH -u "$path"`
36124    new_path=`$WHICH "$new_path" 2> /dev/null`
36125    # bat and cmd files are not always considered executable in cygwin causing which
36126    # to not find them
36127    if test "x$new_path" = x \
36128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36130      new_path=`$CYGPATH -u "$path"`
36131    fi
36132    if test "x$new_path" = x; then
36133      # It's still not found. Now this is an unrecoverable error.
36134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36135$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36136      has_space=`$ECHO "$complete" | $GREP " "`
36137      if test "x$has_space" != x; then
36138        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36139$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36140      fi
36141      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36142    fi
36143  fi
36144
36145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36148  # "foo.exe" is OK but "foo" is an error.
36149  #
36150  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36151  # It is also a way to make sure we got the proper file name for the real test later on.
36152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36153  if test "x$test_shortpath" = x; then
36154    # Short path failed, file does not exist as specified.
36155    # Try adding .exe or .cmd
36156    if test -f "${new_path}.exe"; then
36157      input_to_shortpath="${new_path}.exe"
36158    elif test -f "${new_path}.cmd"; then
36159      input_to_shortpath="${new_path}.cmd"
36160    else
36161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36162$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36163      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36164$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36165      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36166    fi
36167  else
36168    input_to_shortpath="$new_path"
36169  fi
36170
36171  # Call helper function which possibly converts this using DOS-style short mode.
36172  # If so, the updated path is stored in $new_path.
36173  new_path="$input_to_shortpath"
36174
36175  input_path="$input_to_shortpath"
36176  # Check if we need to convert this using DOS-style short mode. If the path
36177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36178  # take no chances and rewrite it.
36179  # Note: m4 eats our [], so we need to use [ and ] instead.
36180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36181  if test "x$has_forbidden_chars" != x; then
36182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36186      # Going to short mode and back again did indeed matter. Since short mode is
36187      # case insensitive, let's make it lowercase to improve readability.
36188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36189      # Now convert it back to Unix-style (cygpath)
36190      input_path=`$CYGPATH -u "$shortmode_path"`
36191      new_path="$input_path"
36192    fi
36193  fi
36194
36195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36196  if test "x$test_cygdrive_prefix" = x; then
36197    # As a simple fix, exclude /usr/bin since it's not a real path.
36198    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36200      # a path prefixed by /cygdrive for fixpath to work.
36201      new_path="$CYGWIN_ROOT_PATH$input_path"
36202    fi
36203  fi
36204
36205  # remove trailing .exe if any
36206  new_path="${new_path/%.exe/}"
36207
36208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36209
36210  # First separate the path from the arguments. This will split at the first
36211  # space.
36212  complete="$AS"
36213  path="${complete%% *}"
36214  tmp="$complete EOL"
36215  arguments="${tmp#* }"
36216
36217  # Input might be given as Windows format, start by converting to
36218  # unix format.
36219  new_path="$path"
36220
36221  windows_path="$new_path"
36222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36223    unix_path=`$CYGPATH -u "$windows_path"`
36224    new_path="$unix_path"
36225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36227    new_path="$unix_path"
36228  fi
36229
36230
36231  # Now try to locate executable using which
36232  new_path=`$WHICH "$new_path" 2> /dev/null`
36233
36234  if test "x$new_path" = x; then
36235    # Oops. Which didn't find the executable.
36236    # The splitting of arguments from the executable at a space might have been incorrect,
36237    # since paths with space are more likely in Windows. Give it another try with the whole
36238    # argument.
36239    path="$complete"
36240    arguments="EOL"
36241    new_path="$path"
36242
36243  windows_path="$new_path"
36244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36245    unix_path=`$CYGPATH -u "$windows_path"`
36246    new_path="$unix_path"
36247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36249    new_path="$unix_path"
36250  fi
36251
36252
36253    new_path=`$WHICH "$new_path" 2> /dev/null`
36254    # bat and cmd files are not always considered executable in MSYS causing which
36255    # to not find them
36256    if test "x$new_path" = x \
36257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36259      new_path="$path"
36260
36261  windows_path="$new_path"
36262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36263    unix_path=`$CYGPATH -u "$windows_path"`
36264    new_path="$unix_path"
36265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36267    new_path="$unix_path"
36268  fi
36269
36270    fi
36271
36272    if test "x$new_path" = x; then
36273      # It's still not found. Now this is an unrecoverable error.
36274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36275$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36276      has_space=`$ECHO "$complete" | $GREP " "`
36277      if test "x$has_space" != x; then
36278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36280      fi
36281      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36282    fi
36283  fi
36284
36285  # Now new_path has a complete unix path to the binary
36286  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36287    # Keep paths in /bin as-is, but remove trailing .exe if any
36288    new_path="${new_path/%.exe/}"
36289    # Do not save /bin paths to all_fixpath_prefixes!
36290  else
36291    # Not in mixed or Windows style, start by that.
36292    new_path=`cmd //c echo $new_path`
36293
36294  input_path="$new_path"
36295  # Check if we need to convert this using DOS-style short mode. If the path
36296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36297  # take no chances and rewrite it.
36298  # Note: m4 eats our [], so we need to use [ and ] instead.
36299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36300  if test "x$has_forbidden_chars" != x; then
36301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36303  fi
36304
36305    # Output is in $new_path
36306
36307  windows_path="$new_path"
36308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36309    unix_path=`$CYGPATH -u "$windows_path"`
36310    new_path="$unix_path"
36311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36313    new_path="$unix_path"
36314  fi
36315
36316    # remove trailing .exe if any
36317    new_path="${new_path/%.exe/}"
36318
36319    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36320    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36321  fi
36322
36323    else
36324      # We're on a unix platform. Hooray! :)
36325      # First separate the path from the arguments. This will split at the first
36326      # space.
36327      complete="$AS"
36328      path="${complete%% *}"
36329      tmp="$complete EOL"
36330      arguments="${tmp#* }"
36331
36332      # Cannot rely on the command "which" here since it doesn't always work.
36333      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36334      if test -z "$is_absolute_path"; then
36335        # Path to executable is not absolute. Find it.
36336        IFS_save="$IFS"
36337        IFS=:
36338        for p in $PATH; do
36339          if test -f "$p/$path" && test -x "$p/$path"; then
36340            new_path="$p/$path"
36341            break
36342          fi
36343        done
36344        IFS="$IFS_save"
36345      else
36346        # This is an absolute path, we can use it without further modifications.
36347        new_path="$path"
36348      fi
36349
36350      if test "x$new_path" = x; then
36351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36352$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36353        has_space=`$ECHO "$complete" | $GREP " "`
36354        if test "x$has_space" != x; then
36355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36357        fi
36358        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36359      fi
36360    fi
36361
36362    # Now join together the path and the arguments once again
36363    if test "x$arguments" != xEOL; then
36364      new_complete="$new_path ${arguments% *}"
36365    else
36366      new_complete="$new_path"
36367    fi
36368
36369    if test "x$complete" != "x$new_complete"; then
36370      AS="$new_complete"
36371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36372$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36373    fi
36374  fi
36375
36376  else
36377    # FIXME: is this correct for microsoft?
36378    AS="$CC -c"
36379  fi
36380
36381
36382  #
36383  # Setup the archiver (AR)
36384  #
36385  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36386    # The corresponding ar tool is lib.exe (used to create static libraries)
36387    # Extract the first word of "lib", so it can be a program name with args.
36388set dummy lib; ac_word=$2
36389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36390$as_echo_n "checking for $ac_word... " >&6; }
36391if ${ac_cv_prog_AR+:} false; then :
36392  $as_echo_n "(cached) " >&6
36393else
36394  if test -n "$AR"; then
36395  ac_cv_prog_AR="$AR" # Let the user override the test.
36396else
36397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36398for as_dir in $PATH
36399do
36400  IFS=$as_save_IFS
36401  test -z "$as_dir" && as_dir=.
36402    for ac_exec_ext in '' $ac_executable_extensions; do
36403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36404    ac_cv_prog_AR="lib"
36405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36406    break 2
36407  fi
36408done
36409  done
36410IFS=$as_save_IFS
36411
36412fi
36413fi
36414AR=$ac_cv_prog_AR
36415if test -n "$AR"; then
36416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36417$as_echo "$AR" >&6; }
36418else
36419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36420$as_echo "no" >&6; }
36421fi
36422
36423
36424  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36425
36426
36427  # Publish this variable in the help.
36428
36429
36430  if [ -z "${AR+x}" ]; then
36431    # The variable is not set by user, try to locate tool using the code snippet
36432    if test -n "$ac_tool_prefix"; then
36433  for ac_prog in ar gcc-ar
36434  do
36435    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36438$as_echo_n "checking for $ac_word... " >&6; }
36439if ${ac_cv_prog_AR+:} false; then :
36440  $as_echo_n "(cached) " >&6
36441else
36442  if test -n "$AR"; then
36443  ac_cv_prog_AR="$AR" # Let the user override the test.
36444else
36445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36446for as_dir in $PATH
36447do
36448  IFS=$as_save_IFS
36449  test -z "$as_dir" && as_dir=.
36450    for ac_exec_ext in '' $ac_executable_extensions; do
36451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36452    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36454    break 2
36455  fi
36456done
36457  done
36458IFS=$as_save_IFS
36459
36460fi
36461fi
36462AR=$ac_cv_prog_AR
36463if test -n "$AR"; then
36464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36465$as_echo "$AR" >&6; }
36466else
36467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36468$as_echo "no" >&6; }
36469fi
36470
36471
36472    test -n "$AR" && break
36473  done
36474fi
36475if test -z "$AR"; then
36476  ac_ct_AR=$AR
36477  for ac_prog in ar gcc-ar
36478do
36479  # Extract the first word of "$ac_prog", so it can be a program name with args.
36480set dummy $ac_prog; ac_word=$2
36481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36482$as_echo_n "checking for $ac_word... " >&6; }
36483if ${ac_cv_prog_ac_ct_AR+:} false; then :
36484  $as_echo_n "(cached) " >&6
36485else
36486  if test -n "$ac_ct_AR"; then
36487  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36488else
36489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36490for as_dir in $PATH
36491do
36492  IFS=$as_save_IFS
36493  test -z "$as_dir" && as_dir=.
36494    for ac_exec_ext in '' $ac_executable_extensions; do
36495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36496    ac_cv_prog_ac_ct_AR="$ac_prog"
36497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36498    break 2
36499  fi
36500done
36501  done
36502IFS=$as_save_IFS
36503
36504fi
36505fi
36506ac_ct_AR=$ac_cv_prog_ac_ct_AR
36507if test -n "$ac_ct_AR"; then
36508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36509$as_echo "$ac_ct_AR" >&6; }
36510else
36511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36512$as_echo "no" >&6; }
36513fi
36514
36515
36516  test -n "$ac_ct_AR" && break
36517done
36518
36519  if test "x$ac_ct_AR" = x; then
36520    AR=""
36521  else
36522    case $cross_compiling:$ac_tool_warned in
36523yes:)
36524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36526ac_tool_warned=yes ;;
36527esac
36528    AR=$ac_ct_AR
36529  fi
36530fi
36531
36532  else
36533    # The variable is set, but is it from the command line or the environment?
36534
36535    # Try to remove the string !AR! from our list.
36536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36538      # If it failed, the variable was not from the command line. Ignore it,
36539      # but warn the user (except for BASH, which is always set by the calling BASH).
36540      if test "xAR" != xBASH; then
36541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36542$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36543      fi
36544      # Try to locate tool using the code snippet
36545      if test -n "$ac_tool_prefix"; then
36546  for ac_prog in ar gcc-ar
36547  do
36548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36551$as_echo_n "checking for $ac_word... " >&6; }
36552if ${ac_cv_prog_AR+:} false; then :
36553  $as_echo_n "(cached) " >&6
36554else
36555  if test -n "$AR"; then
36556  ac_cv_prog_AR="$AR" # Let the user override the test.
36557else
36558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36559for as_dir in $PATH
36560do
36561  IFS=$as_save_IFS
36562  test -z "$as_dir" && as_dir=.
36563    for ac_exec_ext in '' $ac_executable_extensions; do
36564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36565    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36567    break 2
36568  fi
36569done
36570  done
36571IFS=$as_save_IFS
36572
36573fi
36574fi
36575AR=$ac_cv_prog_AR
36576if test -n "$AR"; then
36577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36578$as_echo "$AR" >&6; }
36579else
36580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36581$as_echo "no" >&6; }
36582fi
36583
36584
36585    test -n "$AR" && break
36586  done
36587fi
36588if test -z "$AR"; then
36589  ac_ct_AR=$AR
36590  for ac_prog in ar gcc-ar
36591do
36592  # Extract the first word of "$ac_prog", so it can be a program name with args.
36593set dummy $ac_prog; ac_word=$2
36594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36595$as_echo_n "checking for $ac_word... " >&6; }
36596if ${ac_cv_prog_ac_ct_AR+:} false; then :
36597  $as_echo_n "(cached) " >&6
36598else
36599  if test -n "$ac_ct_AR"; then
36600  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36601else
36602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36603for as_dir in $PATH
36604do
36605  IFS=$as_save_IFS
36606  test -z "$as_dir" && as_dir=.
36607    for ac_exec_ext in '' $ac_executable_extensions; do
36608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36609    ac_cv_prog_ac_ct_AR="$ac_prog"
36610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36611    break 2
36612  fi
36613done
36614  done
36615IFS=$as_save_IFS
36616
36617fi
36618fi
36619ac_ct_AR=$ac_cv_prog_ac_ct_AR
36620if test -n "$ac_ct_AR"; then
36621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36622$as_echo "$ac_ct_AR" >&6; }
36623else
36624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36625$as_echo "no" >&6; }
36626fi
36627
36628
36629  test -n "$ac_ct_AR" && break
36630done
36631
36632  if test "x$ac_ct_AR" = x; then
36633    AR=""
36634  else
36635    case $cross_compiling:$ac_tool_warned in
36636yes:)
36637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36639ac_tool_warned=yes ;;
36640esac
36641    AR=$ac_ct_AR
36642  fi
36643fi
36644
36645    else
36646      # If it succeeded, then it was overridden by the user. We will use it
36647      # for the tool.
36648
36649      # First remove it from the list of overridden variables, so we can test
36650      # for unknown variables in the end.
36651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36652
36653      # Check if we try to supply an empty value
36654      if test "x$AR" = x; then
36655        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36656$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36658$as_echo_n "checking for AR... " >&6; }
36659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36660$as_echo "disabled" >&6; }
36661      else
36662        # Check if the provided tool contains a complete path.
36663        tool_specified="$AR"
36664        tool_basename="${tool_specified##*/}"
36665        if test "x$tool_basename" = "x$tool_specified"; then
36666          # A command without a complete path is provided, search $PATH.
36667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36668$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36669          # Extract the first word of "$tool_basename", so it can be a program name with args.
36670set dummy $tool_basename; ac_word=$2
36671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36672$as_echo_n "checking for $ac_word... " >&6; }
36673if ${ac_cv_path_AR+:} false; then :
36674  $as_echo_n "(cached) " >&6
36675else
36676  case $AR in
36677  [\\/]* | ?:[\\/]*)
36678  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36679  ;;
36680  *)
36681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36682for as_dir in $PATH
36683do
36684  IFS=$as_save_IFS
36685  test -z "$as_dir" && as_dir=.
36686    for ac_exec_ext in '' $ac_executable_extensions; do
36687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36688    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36690    break 2
36691  fi
36692done
36693  done
36694IFS=$as_save_IFS
36695
36696  ;;
36697esac
36698fi
36699AR=$ac_cv_path_AR
36700if test -n "$AR"; then
36701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36702$as_echo "$AR" >&6; }
36703else
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36705$as_echo "no" >&6; }
36706fi
36707
36708
36709          if test "x$AR" = x; then
36710            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36711          fi
36712        else
36713          # Otherwise we believe it is a complete path. Use it as it is.
36714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36715$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36716          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36717$as_echo_n "checking for AR... " >&6; }
36718          if test ! -x "$tool_specified"; then
36719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36720$as_echo "not found" >&6; }
36721            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36722          fi
36723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36724$as_echo "$tool_specified" >&6; }
36725        fi
36726      fi
36727    fi
36728
36729  fi
36730
36731
36732  else
36733
36734
36735  # Publish this variable in the help.
36736
36737
36738  if [ -z "${AR+x}" ]; then
36739    # The variable is not set by user, try to locate tool using the code snippet
36740    if test -n "$ac_tool_prefix"; then
36741  for ac_prog in ar
36742  do
36743    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36744set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36746$as_echo_n "checking for $ac_word... " >&6; }
36747if ${ac_cv_prog_AR+:} false; then :
36748  $as_echo_n "(cached) " >&6
36749else
36750  if test -n "$AR"; then
36751  ac_cv_prog_AR="$AR" # Let the user override the test.
36752else
36753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36754for as_dir in $PATH
36755do
36756  IFS=$as_save_IFS
36757  test -z "$as_dir" && as_dir=.
36758    for ac_exec_ext in '' $ac_executable_extensions; do
36759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36760    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36762    break 2
36763  fi
36764done
36765  done
36766IFS=$as_save_IFS
36767
36768fi
36769fi
36770AR=$ac_cv_prog_AR
36771if test -n "$AR"; then
36772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36773$as_echo "$AR" >&6; }
36774else
36775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36776$as_echo "no" >&6; }
36777fi
36778
36779
36780    test -n "$AR" && break
36781  done
36782fi
36783if test -z "$AR"; then
36784  ac_ct_AR=$AR
36785  for ac_prog in ar
36786do
36787  # Extract the first word of "$ac_prog", so it can be a program name with args.
36788set dummy $ac_prog; ac_word=$2
36789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36790$as_echo_n "checking for $ac_word... " >&6; }
36791if ${ac_cv_prog_ac_ct_AR+:} false; then :
36792  $as_echo_n "(cached) " >&6
36793else
36794  if test -n "$ac_ct_AR"; then
36795  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36796else
36797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36798for as_dir in $PATH
36799do
36800  IFS=$as_save_IFS
36801  test -z "$as_dir" && as_dir=.
36802    for ac_exec_ext in '' $ac_executable_extensions; do
36803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36804    ac_cv_prog_ac_ct_AR="$ac_prog"
36805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36806    break 2
36807  fi
36808done
36809  done
36810IFS=$as_save_IFS
36811
36812fi
36813fi
36814ac_ct_AR=$ac_cv_prog_ac_ct_AR
36815if test -n "$ac_ct_AR"; then
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36817$as_echo "$ac_ct_AR" >&6; }
36818else
36819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36820$as_echo "no" >&6; }
36821fi
36822
36823
36824  test -n "$ac_ct_AR" && break
36825done
36826
36827  if test "x$ac_ct_AR" = x; then
36828    AR=""
36829  else
36830    case $cross_compiling:$ac_tool_warned in
36831yes:)
36832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36834ac_tool_warned=yes ;;
36835esac
36836    AR=$ac_ct_AR
36837  fi
36838fi
36839
36840  else
36841    # The variable is set, but is it from the command line or the environment?
36842
36843    # Try to remove the string !AR! from our list.
36844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36846      # If it failed, the variable was not from the command line. Ignore it,
36847      # but warn the user (except for BASH, which is always set by the calling BASH).
36848      if test "xAR" != xBASH; then
36849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36850$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36851      fi
36852      # Try to locate tool using the code snippet
36853      if test -n "$ac_tool_prefix"; then
36854  for ac_prog in ar
36855  do
36856    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36857set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36859$as_echo_n "checking for $ac_word... " >&6; }
36860if ${ac_cv_prog_AR+:} false; then :
36861  $as_echo_n "(cached) " >&6
36862else
36863  if test -n "$AR"; then
36864  ac_cv_prog_AR="$AR" # Let the user override the test.
36865else
36866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36867for as_dir in $PATH
36868do
36869  IFS=$as_save_IFS
36870  test -z "$as_dir" && as_dir=.
36871    for ac_exec_ext in '' $ac_executable_extensions; do
36872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36873    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36875    break 2
36876  fi
36877done
36878  done
36879IFS=$as_save_IFS
36880
36881fi
36882fi
36883AR=$ac_cv_prog_AR
36884if test -n "$AR"; then
36885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36886$as_echo "$AR" >&6; }
36887else
36888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36889$as_echo "no" >&6; }
36890fi
36891
36892
36893    test -n "$AR" && break
36894  done
36895fi
36896if test -z "$AR"; then
36897  ac_ct_AR=$AR
36898  for ac_prog in ar
36899do
36900  # Extract the first word of "$ac_prog", so it can be a program name with args.
36901set dummy $ac_prog; ac_word=$2
36902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36903$as_echo_n "checking for $ac_word... " >&6; }
36904if ${ac_cv_prog_ac_ct_AR+:} false; then :
36905  $as_echo_n "(cached) " >&6
36906else
36907  if test -n "$ac_ct_AR"; then
36908  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36909else
36910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36911for as_dir in $PATH
36912do
36913  IFS=$as_save_IFS
36914  test -z "$as_dir" && as_dir=.
36915    for ac_exec_ext in '' $ac_executable_extensions; do
36916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36917    ac_cv_prog_ac_ct_AR="$ac_prog"
36918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36919    break 2
36920  fi
36921done
36922  done
36923IFS=$as_save_IFS
36924
36925fi
36926fi
36927ac_ct_AR=$ac_cv_prog_ac_ct_AR
36928if test -n "$ac_ct_AR"; then
36929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36930$as_echo "$ac_ct_AR" >&6; }
36931else
36932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36933$as_echo "no" >&6; }
36934fi
36935
36936
36937  test -n "$ac_ct_AR" && break
36938done
36939
36940  if test "x$ac_ct_AR" = x; then
36941    AR=""
36942  else
36943    case $cross_compiling:$ac_tool_warned in
36944yes:)
36945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36947ac_tool_warned=yes ;;
36948esac
36949    AR=$ac_ct_AR
36950  fi
36951fi
36952
36953    else
36954      # If it succeeded, then it was overridden by the user. We will use it
36955      # for the tool.
36956
36957      # First remove it from the list of overridden variables, so we can test
36958      # for unknown variables in the end.
36959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36960
36961      # Check if we try to supply an empty value
36962      if test "x$AR" = x; then
36963        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36964$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36966$as_echo_n "checking for AR... " >&6; }
36967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36968$as_echo "disabled" >&6; }
36969      else
36970        # Check if the provided tool contains a complete path.
36971        tool_specified="$AR"
36972        tool_basename="${tool_specified##*/}"
36973        if test "x$tool_basename" = "x$tool_specified"; then
36974          # A command without a complete path is provided, search $PATH.
36975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36976$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36977          # Extract the first word of "$tool_basename", so it can be a program name with args.
36978set dummy $tool_basename; ac_word=$2
36979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36980$as_echo_n "checking for $ac_word... " >&6; }
36981if ${ac_cv_path_AR+:} false; then :
36982  $as_echo_n "(cached) " >&6
36983else
36984  case $AR in
36985  [\\/]* | ?:[\\/]*)
36986  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36987  ;;
36988  *)
36989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36990for as_dir in $PATH
36991do
36992  IFS=$as_save_IFS
36993  test -z "$as_dir" && as_dir=.
36994    for ac_exec_ext in '' $ac_executable_extensions; do
36995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36996    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36998    break 2
36999  fi
37000done
37001  done
37002IFS=$as_save_IFS
37003
37004  ;;
37005esac
37006fi
37007AR=$ac_cv_path_AR
37008if test -n "$AR"; then
37009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37010$as_echo "$AR" >&6; }
37011else
37012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37013$as_echo "no" >&6; }
37014fi
37015
37016
37017          if test "x$AR" = x; then
37018            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37019          fi
37020        else
37021          # Otherwise we believe it is a complete path. Use it as it is.
37022          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37023$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37024          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37025$as_echo_n "checking for AR... " >&6; }
37026          if test ! -x "$tool_specified"; then
37027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37028$as_echo "not found" >&6; }
37029            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37030          fi
37031          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37032$as_echo "$tool_specified" >&6; }
37033        fi
37034      fi
37035    fi
37036
37037  fi
37038
37039
37040  fi
37041
37042  # Only process if variable expands to non-empty
37043
37044  if test "x$AR" != x; then
37045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37046
37047  # First separate the path from the arguments. This will split at the first
37048  # space.
37049  complete="$AR"
37050  path="${complete%% *}"
37051  tmp="$complete EOL"
37052  arguments="${tmp#* }"
37053
37054  # Input might be given as Windows format, start by converting to
37055  # unix format.
37056  new_path=`$CYGPATH -u "$path"`
37057
37058  # Now try to locate executable using which
37059  new_path=`$WHICH "$new_path" 2> /dev/null`
37060  # bat and cmd files are not always considered executable in cygwin causing which
37061  # to not find them
37062  if test "x$new_path" = x \
37063      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37064      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37065    new_path=`$CYGPATH -u "$path"`
37066  fi
37067  if test "x$new_path" = x; then
37068    # Oops. Which didn't find the executable.
37069    # The splitting of arguments from the executable at a space might have been incorrect,
37070    # since paths with space are more likely in Windows. Give it another try with the whole
37071    # argument.
37072    path="$complete"
37073    arguments="EOL"
37074    new_path=`$CYGPATH -u "$path"`
37075    new_path=`$WHICH "$new_path" 2> /dev/null`
37076    # bat and cmd files are not always considered executable in cygwin causing which
37077    # to not find them
37078    if test "x$new_path" = x \
37079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37081      new_path=`$CYGPATH -u "$path"`
37082    fi
37083    if test "x$new_path" = x; then
37084      # It's still not found. Now this is an unrecoverable error.
37085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37086$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37087      has_space=`$ECHO "$complete" | $GREP " "`
37088      if test "x$has_space" != x; then
37089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37091      fi
37092      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37093    fi
37094  fi
37095
37096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37099  # "foo.exe" is OK but "foo" is an error.
37100  #
37101  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37102  # It is also a way to make sure we got the proper file name for the real test later on.
37103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37104  if test "x$test_shortpath" = x; then
37105    # Short path failed, file does not exist as specified.
37106    # Try adding .exe or .cmd
37107    if test -f "${new_path}.exe"; then
37108      input_to_shortpath="${new_path}.exe"
37109    elif test -f "${new_path}.cmd"; then
37110      input_to_shortpath="${new_path}.cmd"
37111    else
37112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37113$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37114      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37115$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37116      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37117    fi
37118  else
37119    input_to_shortpath="$new_path"
37120  fi
37121
37122  # Call helper function which possibly converts this using DOS-style short mode.
37123  # If so, the updated path is stored in $new_path.
37124  new_path="$input_to_shortpath"
37125
37126  input_path="$input_to_shortpath"
37127  # Check if we need to convert this using DOS-style short mode. If the path
37128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37129  # take no chances and rewrite it.
37130  # Note: m4 eats our [], so we need to use [ and ] instead.
37131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37132  if test "x$has_forbidden_chars" != x; then
37133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37137      # Going to short mode and back again did indeed matter. Since short mode is
37138      # case insensitive, let's make it lowercase to improve readability.
37139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37140      # Now convert it back to Unix-style (cygpath)
37141      input_path=`$CYGPATH -u "$shortmode_path"`
37142      new_path="$input_path"
37143    fi
37144  fi
37145
37146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37147  if test "x$test_cygdrive_prefix" = x; then
37148    # As a simple fix, exclude /usr/bin since it's not a real path.
37149    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37151      # a path prefixed by /cygdrive for fixpath to work.
37152      new_path="$CYGWIN_ROOT_PATH$input_path"
37153    fi
37154  fi
37155
37156  # remove trailing .exe if any
37157  new_path="${new_path/%.exe/}"
37158
37159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37160
37161  # First separate the path from the arguments. This will split at the first
37162  # space.
37163  complete="$AR"
37164  path="${complete%% *}"
37165  tmp="$complete EOL"
37166  arguments="${tmp#* }"
37167
37168  # Input might be given as Windows format, start by converting to
37169  # unix format.
37170  new_path="$path"
37171
37172  windows_path="$new_path"
37173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37174    unix_path=`$CYGPATH -u "$windows_path"`
37175    new_path="$unix_path"
37176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37178    new_path="$unix_path"
37179  fi
37180
37181
37182  # Now try to locate executable using which
37183  new_path=`$WHICH "$new_path" 2> /dev/null`
37184
37185  if test "x$new_path" = x; then
37186    # Oops. Which didn't find the executable.
37187    # The splitting of arguments from the executable at a space might have been incorrect,
37188    # since paths with space are more likely in Windows. Give it another try with the whole
37189    # argument.
37190    path="$complete"
37191    arguments="EOL"
37192    new_path="$path"
37193
37194  windows_path="$new_path"
37195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37196    unix_path=`$CYGPATH -u "$windows_path"`
37197    new_path="$unix_path"
37198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37200    new_path="$unix_path"
37201  fi
37202
37203
37204    new_path=`$WHICH "$new_path" 2> /dev/null`
37205    # bat and cmd files are not always considered executable in MSYS causing which
37206    # to not find them
37207    if test "x$new_path" = x \
37208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37210      new_path="$path"
37211
37212  windows_path="$new_path"
37213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37214    unix_path=`$CYGPATH -u "$windows_path"`
37215    new_path="$unix_path"
37216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37218    new_path="$unix_path"
37219  fi
37220
37221    fi
37222
37223    if test "x$new_path" = x; then
37224      # It's still not found. Now this is an unrecoverable error.
37225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37226$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37227      has_space=`$ECHO "$complete" | $GREP " "`
37228      if test "x$has_space" != x; then
37229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37231      fi
37232      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37233    fi
37234  fi
37235
37236  # Now new_path has a complete unix path to the binary
37237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37238    # Keep paths in /bin as-is, but remove trailing .exe if any
37239    new_path="${new_path/%.exe/}"
37240    # Do not save /bin paths to all_fixpath_prefixes!
37241  else
37242    # Not in mixed or Windows style, start by that.
37243    new_path=`cmd //c echo $new_path`
37244
37245  input_path="$new_path"
37246  # Check if we need to convert this using DOS-style short mode. If the path
37247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37248  # take no chances and rewrite it.
37249  # Note: m4 eats our [], so we need to use [ and ] instead.
37250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37251  if test "x$has_forbidden_chars" != x; then
37252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37254  fi
37255
37256    # Output is in $new_path
37257
37258  windows_path="$new_path"
37259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37260    unix_path=`$CYGPATH -u "$windows_path"`
37261    new_path="$unix_path"
37262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37264    new_path="$unix_path"
37265  fi
37266
37267    # remove trailing .exe if any
37268    new_path="${new_path/%.exe/}"
37269
37270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37272  fi
37273
37274    else
37275      # We're on a unix platform. Hooray! :)
37276      # First separate the path from the arguments. This will split at the first
37277      # space.
37278      complete="$AR"
37279      path="${complete%% *}"
37280      tmp="$complete EOL"
37281      arguments="${tmp#* }"
37282
37283      # Cannot rely on the command "which" here since it doesn't always work.
37284      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37285      if test -z "$is_absolute_path"; then
37286        # Path to executable is not absolute. Find it.
37287        IFS_save="$IFS"
37288        IFS=:
37289        for p in $PATH; do
37290          if test -f "$p/$path" && test -x "$p/$path"; then
37291            new_path="$p/$path"
37292            break
37293          fi
37294        done
37295        IFS="$IFS_save"
37296      else
37297        # This is an absolute path, we can use it without further modifications.
37298        new_path="$path"
37299      fi
37300
37301      if test "x$new_path" = x; then
37302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37303$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37304        has_space=`$ECHO "$complete" | $GREP " "`
37305        if test "x$has_space" != x; then
37306          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37308        fi
37309        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37310      fi
37311    fi
37312
37313    # Now join together the path and the arguments once again
37314    if test "x$arguments" != xEOL; then
37315      new_complete="$new_path ${arguments% *}"
37316    else
37317      new_complete="$new_path"
37318    fi
37319
37320    if test "x$complete" != "x$new_complete"; then
37321      AR="$new_complete"
37322      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37323$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37324    fi
37325  fi
37326
37327
37328
37329  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37330
37331
37332  # Publish this variable in the help.
37333
37334
37335  if [ -z "${LIPO+x}" ]; then
37336    # The variable is not set by user, try to locate tool using the code snippet
37337    for ac_prog in lipo
37338do
37339  # Extract the first word of "$ac_prog", so it can be a program name with args.
37340set dummy $ac_prog; ac_word=$2
37341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37342$as_echo_n "checking for $ac_word... " >&6; }
37343if ${ac_cv_path_LIPO+:} false; then :
37344  $as_echo_n "(cached) " >&6
37345else
37346  case $LIPO in
37347  [\\/]* | ?:[\\/]*)
37348  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37349  ;;
37350  *)
37351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37352for as_dir in $PATH
37353do
37354  IFS=$as_save_IFS
37355  test -z "$as_dir" && as_dir=.
37356    for ac_exec_ext in '' $ac_executable_extensions; do
37357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37358    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37360    break 2
37361  fi
37362done
37363  done
37364IFS=$as_save_IFS
37365
37366  ;;
37367esac
37368fi
37369LIPO=$ac_cv_path_LIPO
37370if test -n "$LIPO"; then
37371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37372$as_echo "$LIPO" >&6; }
37373else
37374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37375$as_echo "no" >&6; }
37376fi
37377
37378
37379  test -n "$LIPO" && break
37380done
37381
37382  else
37383    # The variable is set, but is it from the command line or the environment?
37384
37385    # Try to remove the string !LIPO! from our list.
37386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37388      # If it failed, the variable was not from the command line. Ignore it,
37389      # but warn the user (except for BASH, which is always set by the calling BASH).
37390      if test "xLIPO" != xBASH; then
37391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37392$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37393      fi
37394      # Try to locate tool using the code snippet
37395      for ac_prog in lipo
37396do
37397  # Extract the first word of "$ac_prog", so it can be a program name with args.
37398set dummy $ac_prog; ac_word=$2
37399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37400$as_echo_n "checking for $ac_word... " >&6; }
37401if ${ac_cv_path_LIPO+:} false; then :
37402  $as_echo_n "(cached) " >&6
37403else
37404  case $LIPO in
37405  [\\/]* | ?:[\\/]*)
37406  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37407  ;;
37408  *)
37409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37410for as_dir in $PATH
37411do
37412  IFS=$as_save_IFS
37413  test -z "$as_dir" && as_dir=.
37414    for ac_exec_ext in '' $ac_executable_extensions; do
37415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37416    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37418    break 2
37419  fi
37420done
37421  done
37422IFS=$as_save_IFS
37423
37424  ;;
37425esac
37426fi
37427LIPO=$ac_cv_path_LIPO
37428if test -n "$LIPO"; then
37429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37430$as_echo "$LIPO" >&6; }
37431else
37432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37433$as_echo "no" >&6; }
37434fi
37435
37436
37437  test -n "$LIPO" && break
37438done
37439
37440    else
37441      # If it succeeded, then it was overridden by the user. We will use it
37442      # for the tool.
37443
37444      # First remove it from the list of overridden variables, so we can test
37445      # for unknown variables in the end.
37446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37447
37448      # Check if we try to supply an empty value
37449      if test "x$LIPO" = x; then
37450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37451$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37453$as_echo_n "checking for LIPO... " >&6; }
37454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37455$as_echo "disabled" >&6; }
37456      else
37457        # Check if the provided tool contains a complete path.
37458        tool_specified="$LIPO"
37459        tool_basename="${tool_specified##*/}"
37460        if test "x$tool_basename" = "x$tool_specified"; then
37461          # A command without a complete path is provided, search $PATH.
37462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37463$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37464          # Extract the first word of "$tool_basename", so it can be a program name with args.
37465set dummy $tool_basename; ac_word=$2
37466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37467$as_echo_n "checking for $ac_word... " >&6; }
37468if ${ac_cv_path_LIPO+:} false; then :
37469  $as_echo_n "(cached) " >&6
37470else
37471  case $LIPO in
37472  [\\/]* | ?:[\\/]*)
37473  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37474  ;;
37475  *)
37476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37477for as_dir in $PATH
37478do
37479  IFS=$as_save_IFS
37480  test -z "$as_dir" && as_dir=.
37481    for ac_exec_ext in '' $ac_executable_extensions; do
37482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37483    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37485    break 2
37486  fi
37487done
37488  done
37489IFS=$as_save_IFS
37490
37491  ;;
37492esac
37493fi
37494LIPO=$ac_cv_path_LIPO
37495if test -n "$LIPO"; then
37496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37497$as_echo "$LIPO" >&6; }
37498else
37499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37500$as_echo "no" >&6; }
37501fi
37502
37503
37504          if test "x$LIPO" = x; then
37505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37506          fi
37507        else
37508          # Otherwise we believe it is a complete path. Use it as it is.
37509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37510$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37512$as_echo_n "checking for LIPO... " >&6; }
37513          if test ! -x "$tool_specified"; then
37514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37515$as_echo "not found" >&6; }
37516            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37517          fi
37518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37519$as_echo "$tool_specified" >&6; }
37520        fi
37521      fi
37522    fi
37523
37524  fi
37525
37526
37527
37528  # Only process if variable expands to non-empty
37529
37530  if test "x$LIPO" != x; then
37531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37532
37533  # First separate the path from the arguments. This will split at the first
37534  # space.
37535  complete="$LIPO"
37536  path="${complete%% *}"
37537  tmp="$complete EOL"
37538  arguments="${tmp#* }"
37539
37540  # Input might be given as Windows format, start by converting to
37541  # unix format.
37542  new_path=`$CYGPATH -u "$path"`
37543
37544  # Now try to locate executable using which
37545  new_path=`$WHICH "$new_path" 2> /dev/null`
37546  # bat and cmd files are not always considered executable in cygwin causing which
37547  # to not find them
37548  if test "x$new_path" = x \
37549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37551    new_path=`$CYGPATH -u "$path"`
37552  fi
37553  if test "x$new_path" = x; then
37554    # Oops. Which didn't find the executable.
37555    # The splitting of arguments from the executable at a space might have been incorrect,
37556    # since paths with space are more likely in Windows. Give it another try with the whole
37557    # argument.
37558    path="$complete"
37559    arguments="EOL"
37560    new_path=`$CYGPATH -u "$path"`
37561    new_path=`$WHICH "$new_path" 2> /dev/null`
37562    # bat and cmd files are not always considered executable in cygwin causing which
37563    # to not find them
37564    if test "x$new_path" = x \
37565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37567      new_path=`$CYGPATH -u "$path"`
37568    fi
37569    if test "x$new_path" = x; then
37570      # It's still not found. Now this is an unrecoverable error.
37571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37572$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37573      has_space=`$ECHO "$complete" | $GREP " "`
37574      if test "x$has_space" != x; then
37575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37577      fi
37578      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37579    fi
37580  fi
37581
37582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37585  # "foo.exe" is OK but "foo" is an error.
37586  #
37587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37588  # It is also a way to make sure we got the proper file name for the real test later on.
37589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37590  if test "x$test_shortpath" = x; then
37591    # Short path failed, file does not exist as specified.
37592    # Try adding .exe or .cmd
37593    if test -f "${new_path}.exe"; then
37594      input_to_shortpath="${new_path}.exe"
37595    elif test -f "${new_path}.cmd"; then
37596      input_to_shortpath="${new_path}.cmd"
37597    else
37598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37599$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37602      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37603    fi
37604  else
37605    input_to_shortpath="$new_path"
37606  fi
37607
37608  # Call helper function which possibly converts this using DOS-style short mode.
37609  # If so, the updated path is stored in $new_path.
37610  new_path="$input_to_shortpath"
37611
37612  input_path="$input_to_shortpath"
37613  # Check if we need to convert this using DOS-style short mode. If the path
37614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37615  # take no chances and rewrite it.
37616  # Note: m4 eats our [], so we need to use [ and ] instead.
37617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37618  if test "x$has_forbidden_chars" != x; then
37619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37623      # Going to short mode and back again did indeed matter. Since short mode is
37624      # case insensitive, let's make it lowercase to improve readability.
37625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37626      # Now convert it back to Unix-style (cygpath)
37627      input_path=`$CYGPATH -u "$shortmode_path"`
37628      new_path="$input_path"
37629    fi
37630  fi
37631
37632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37633  if test "x$test_cygdrive_prefix" = x; then
37634    # As a simple fix, exclude /usr/bin since it's not a real path.
37635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37637      # a path prefixed by /cygdrive for fixpath to work.
37638      new_path="$CYGWIN_ROOT_PATH$input_path"
37639    fi
37640  fi
37641
37642  # remove trailing .exe if any
37643  new_path="${new_path/%.exe/}"
37644
37645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37646
37647  # First separate the path from the arguments. This will split at the first
37648  # space.
37649  complete="$LIPO"
37650  path="${complete%% *}"
37651  tmp="$complete EOL"
37652  arguments="${tmp#* }"
37653
37654  # Input might be given as Windows format, start by converting to
37655  # unix format.
37656  new_path="$path"
37657
37658  windows_path="$new_path"
37659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37660    unix_path=`$CYGPATH -u "$windows_path"`
37661    new_path="$unix_path"
37662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37664    new_path="$unix_path"
37665  fi
37666
37667
37668  # Now try to locate executable using which
37669  new_path=`$WHICH "$new_path" 2> /dev/null`
37670
37671  if test "x$new_path" = x; then
37672    # Oops. Which didn't find the executable.
37673    # The splitting of arguments from the executable at a space might have been incorrect,
37674    # since paths with space are more likely in Windows. Give it another try with the whole
37675    # argument.
37676    path="$complete"
37677    arguments="EOL"
37678    new_path="$path"
37679
37680  windows_path="$new_path"
37681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37682    unix_path=`$CYGPATH -u "$windows_path"`
37683    new_path="$unix_path"
37684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37686    new_path="$unix_path"
37687  fi
37688
37689
37690    new_path=`$WHICH "$new_path" 2> /dev/null`
37691    # bat and cmd files are not always considered executable in MSYS causing which
37692    # to not find them
37693    if test "x$new_path" = x \
37694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37696      new_path="$path"
37697
37698  windows_path="$new_path"
37699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37700    unix_path=`$CYGPATH -u "$windows_path"`
37701    new_path="$unix_path"
37702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37704    new_path="$unix_path"
37705  fi
37706
37707    fi
37708
37709    if test "x$new_path" = x; then
37710      # It's still not found. Now this is an unrecoverable error.
37711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37712$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37713      has_space=`$ECHO "$complete" | $GREP " "`
37714      if test "x$has_space" != x; then
37715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37717      fi
37718      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37719    fi
37720  fi
37721
37722  # Now new_path has a complete unix path to the binary
37723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37724    # Keep paths in /bin as-is, but remove trailing .exe if any
37725    new_path="${new_path/%.exe/}"
37726    # Do not save /bin paths to all_fixpath_prefixes!
37727  else
37728    # Not in mixed or Windows style, start by that.
37729    new_path=`cmd //c echo $new_path`
37730
37731  input_path="$new_path"
37732  # Check if we need to convert this using DOS-style short mode. If the path
37733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37734  # take no chances and rewrite it.
37735  # Note: m4 eats our [], so we need to use [ and ] instead.
37736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37737  if test "x$has_forbidden_chars" != x; then
37738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37740  fi
37741
37742    # Output is in $new_path
37743
37744  windows_path="$new_path"
37745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37746    unix_path=`$CYGPATH -u "$windows_path"`
37747    new_path="$unix_path"
37748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37750    new_path="$unix_path"
37751  fi
37752
37753    # remove trailing .exe if any
37754    new_path="${new_path/%.exe/}"
37755
37756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37758  fi
37759
37760    else
37761      # We're on a unix platform. Hooray! :)
37762      # First separate the path from the arguments. This will split at the first
37763      # space.
37764      complete="$LIPO"
37765      path="${complete%% *}"
37766      tmp="$complete EOL"
37767      arguments="${tmp#* }"
37768
37769      # Cannot rely on the command "which" here since it doesn't always work.
37770      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37771      if test -z "$is_absolute_path"; then
37772        # Path to executable is not absolute. Find it.
37773        IFS_save="$IFS"
37774        IFS=:
37775        for p in $PATH; do
37776          if test -f "$p/$path" && test -x "$p/$path"; then
37777            new_path="$p/$path"
37778            break
37779          fi
37780        done
37781        IFS="$IFS_save"
37782      else
37783        # This is an absolute path, we can use it without further modifications.
37784        new_path="$path"
37785      fi
37786
37787      if test "x$new_path" = x; then
37788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37789$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37790        has_space=`$ECHO "$complete" | $GREP " "`
37791        if test "x$has_space" != x; then
37792          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37794        fi
37795        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37796      fi
37797    fi
37798
37799    # Now join together the path and the arguments once again
37800    if test "x$arguments" != xEOL; then
37801      new_complete="$new_path ${arguments% *}"
37802    else
37803      new_complete="$new_path"
37804    fi
37805
37806    if test "x$complete" != "x$new_complete"; then
37807      LIPO="$new_complete"
37808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37809$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37810    fi
37811  fi
37812
37813  fi
37814
37815  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37816    # Extract the first word of "mt", so it can be a program name with args.
37817set dummy mt; ac_word=$2
37818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37819$as_echo_n "checking for $ac_word... " >&6; }
37820if ${ac_cv_prog_MT+:} false; then :
37821  $as_echo_n "(cached) " >&6
37822else
37823  if test -n "$MT"; then
37824  ac_cv_prog_MT="$MT" # Let the user override the test.
37825else
37826  ac_prog_rejected=no
37827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37828for as_dir in $PATH
37829do
37830  IFS=$as_save_IFS
37831  test -z "$as_dir" && as_dir=.
37832    for ac_exec_ext in '' $ac_executable_extensions; do
37833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37834    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37835       ac_prog_rejected=yes
37836       continue
37837     fi
37838    ac_cv_prog_MT="mt"
37839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37840    break 2
37841  fi
37842done
37843  done
37844IFS=$as_save_IFS
37845
37846if test $ac_prog_rejected = yes; then
37847  # We found a bogon in the path, so make sure we never use it.
37848  set dummy $ac_cv_prog_MT
37849  shift
37850  if test $# != 0; then
37851    # We chose a different compiler from the bogus one.
37852    # However, it has the same basename, so the bogon will be chosen
37853    # first if we set MT to just the basename; use the full file name.
37854    shift
37855    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37856  fi
37857fi
37858fi
37859fi
37860MT=$ac_cv_prog_MT
37861if test -n "$MT"; then
37862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37863$as_echo "$MT" >&6; }
37864else
37865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37866$as_echo "no" >&6; }
37867fi
37868
37869
37870
37871  # Only process if variable expands to non-empty
37872
37873  if test "x$MT" != x; then
37874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37875
37876  # First separate the path from the arguments. This will split at the first
37877  # space.
37878  complete="$MT"
37879  path="${complete%% *}"
37880  tmp="$complete EOL"
37881  arguments="${tmp#* }"
37882
37883  # Input might be given as Windows format, start by converting to
37884  # unix format.
37885  new_path=`$CYGPATH -u "$path"`
37886
37887  # Now try to locate executable using which
37888  new_path=`$WHICH "$new_path" 2> /dev/null`
37889  # bat and cmd files are not always considered executable in cygwin causing which
37890  # to not find them
37891  if test "x$new_path" = x \
37892      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37893      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37894    new_path=`$CYGPATH -u "$path"`
37895  fi
37896  if test "x$new_path" = x; then
37897    # Oops. Which didn't find the executable.
37898    # The splitting of arguments from the executable at a space might have been incorrect,
37899    # since paths with space are more likely in Windows. Give it another try with the whole
37900    # argument.
37901    path="$complete"
37902    arguments="EOL"
37903    new_path=`$CYGPATH -u "$path"`
37904    new_path=`$WHICH "$new_path" 2> /dev/null`
37905    # bat and cmd files are not always considered executable in cygwin causing which
37906    # to not find them
37907    if test "x$new_path" = x \
37908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37910      new_path=`$CYGPATH -u "$path"`
37911    fi
37912    if test "x$new_path" = x; then
37913      # It's still not found. Now this is an unrecoverable error.
37914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37915$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37916      has_space=`$ECHO "$complete" | $GREP " "`
37917      if test "x$has_space" != x; then
37918        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37919$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37920      fi
37921      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37922    fi
37923  fi
37924
37925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37928  # "foo.exe" is OK but "foo" is an error.
37929  #
37930  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37931  # It is also a way to make sure we got the proper file name for the real test later on.
37932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37933  if test "x$test_shortpath" = x; then
37934    # Short path failed, file does not exist as specified.
37935    # Try adding .exe or .cmd
37936    if test -f "${new_path}.exe"; then
37937      input_to_shortpath="${new_path}.exe"
37938    elif test -f "${new_path}.cmd"; then
37939      input_to_shortpath="${new_path}.cmd"
37940    else
37941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37942$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37943      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37944$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37945      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37946    fi
37947  else
37948    input_to_shortpath="$new_path"
37949  fi
37950
37951  # Call helper function which possibly converts this using DOS-style short mode.
37952  # If so, the updated path is stored in $new_path.
37953  new_path="$input_to_shortpath"
37954
37955  input_path="$input_to_shortpath"
37956  # Check if we need to convert this using DOS-style short mode. If the path
37957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37958  # take no chances and rewrite it.
37959  # Note: m4 eats our [], so we need to use [ and ] instead.
37960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37961  if test "x$has_forbidden_chars" != x; then
37962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37966      # Going to short mode and back again did indeed matter. Since short mode is
37967      # case insensitive, let's make it lowercase to improve readability.
37968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37969      # Now convert it back to Unix-style (cygpath)
37970      input_path=`$CYGPATH -u "$shortmode_path"`
37971      new_path="$input_path"
37972    fi
37973  fi
37974
37975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37976  if test "x$test_cygdrive_prefix" = x; then
37977    # As a simple fix, exclude /usr/bin since it's not a real path.
37978    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37980      # a path prefixed by /cygdrive for fixpath to work.
37981      new_path="$CYGWIN_ROOT_PATH$input_path"
37982    fi
37983  fi
37984
37985  # remove trailing .exe if any
37986  new_path="${new_path/%.exe/}"
37987
37988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37989
37990  # First separate the path from the arguments. This will split at the first
37991  # space.
37992  complete="$MT"
37993  path="${complete%% *}"
37994  tmp="$complete EOL"
37995  arguments="${tmp#* }"
37996
37997  # Input might be given as Windows format, start by converting to
37998  # unix format.
37999  new_path="$path"
38000
38001  windows_path="$new_path"
38002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38003    unix_path=`$CYGPATH -u "$windows_path"`
38004    new_path="$unix_path"
38005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38007    new_path="$unix_path"
38008  fi
38009
38010
38011  # Now try to locate executable using which
38012  new_path=`$WHICH "$new_path" 2> /dev/null`
38013
38014  if test "x$new_path" = x; then
38015    # Oops. Which didn't find the executable.
38016    # The splitting of arguments from the executable at a space might have been incorrect,
38017    # since paths with space are more likely in Windows. Give it another try with the whole
38018    # argument.
38019    path="$complete"
38020    arguments="EOL"
38021    new_path="$path"
38022
38023  windows_path="$new_path"
38024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38025    unix_path=`$CYGPATH -u "$windows_path"`
38026    new_path="$unix_path"
38027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38029    new_path="$unix_path"
38030  fi
38031
38032
38033    new_path=`$WHICH "$new_path" 2> /dev/null`
38034    # bat and cmd files are not always considered executable in MSYS causing which
38035    # to not find them
38036    if test "x$new_path" = x \
38037        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38038        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38039      new_path="$path"
38040
38041  windows_path="$new_path"
38042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38043    unix_path=`$CYGPATH -u "$windows_path"`
38044    new_path="$unix_path"
38045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38047    new_path="$unix_path"
38048  fi
38049
38050    fi
38051
38052    if test "x$new_path" = x; then
38053      # It's still not found. Now this is an unrecoverable error.
38054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38055$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38056      has_space=`$ECHO "$complete" | $GREP " "`
38057      if test "x$has_space" != x; then
38058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38060      fi
38061      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38062    fi
38063  fi
38064
38065  # Now new_path has a complete unix path to the binary
38066  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38067    # Keep paths in /bin as-is, but remove trailing .exe if any
38068    new_path="${new_path/%.exe/}"
38069    # Do not save /bin paths to all_fixpath_prefixes!
38070  else
38071    # Not in mixed or Windows style, start by that.
38072    new_path=`cmd //c echo $new_path`
38073
38074  input_path="$new_path"
38075  # Check if we need to convert this using DOS-style short mode. If the path
38076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38077  # take no chances and rewrite it.
38078  # Note: m4 eats our [], so we need to use [ and ] instead.
38079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38080  if test "x$has_forbidden_chars" != x; then
38081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38083  fi
38084
38085    # Output is in $new_path
38086
38087  windows_path="$new_path"
38088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38089    unix_path=`$CYGPATH -u "$windows_path"`
38090    new_path="$unix_path"
38091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38093    new_path="$unix_path"
38094  fi
38095
38096    # remove trailing .exe if any
38097    new_path="${new_path/%.exe/}"
38098
38099    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38100    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38101  fi
38102
38103    else
38104      # We're on a unix platform. Hooray! :)
38105      # First separate the path from the arguments. This will split at the first
38106      # space.
38107      complete="$MT"
38108      path="${complete%% *}"
38109      tmp="$complete EOL"
38110      arguments="${tmp#* }"
38111
38112      # Cannot rely on the command "which" here since it doesn't always work.
38113      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38114      if test -z "$is_absolute_path"; then
38115        # Path to executable is not absolute. Find it.
38116        IFS_save="$IFS"
38117        IFS=:
38118        for p in $PATH; do
38119          if test -f "$p/$path" && test -x "$p/$path"; then
38120            new_path="$p/$path"
38121            break
38122          fi
38123        done
38124        IFS="$IFS_save"
38125      else
38126        # This is an absolute path, we can use it without further modifications.
38127        new_path="$path"
38128      fi
38129
38130      if test "x$new_path" = x; then
38131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38132$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38133        has_space=`$ECHO "$complete" | $GREP " "`
38134        if test "x$has_space" != x; then
38135          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38136$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38137        fi
38138        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38139      fi
38140    fi
38141
38142    # Now join together the path and the arguments once again
38143    if test "x$arguments" != xEOL; then
38144      new_complete="$new_path ${arguments% *}"
38145    else
38146      new_complete="$new_path"
38147    fi
38148
38149    if test "x$complete" != "x$new_complete"; then
38150      MT="$new_complete"
38151      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38152$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38153    fi
38154  fi
38155
38156    # Setup the resource compiler (RC)
38157    # Extract the first word of "rc", so it can be a program name with args.
38158set dummy rc; ac_word=$2
38159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38160$as_echo_n "checking for $ac_word... " >&6; }
38161if ${ac_cv_prog_RC+:} false; then :
38162  $as_echo_n "(cached) " >&6
38163else
38164  if test -n "$RC"; then
38165  ac_cv_prog_RC="$RC" # Let the user override the test.
38166else
38167  ac_prog_rejected=no
38168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38169for as_dir in $PATH
38170do
38171  IFS=$as_save_IFS
38172  test -z "$as_dir" && as_dir=.
38173    for ac_exec_ext in '' $ac_executable_extensions; do
38174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38175    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38176       ac_prog_rejected=yes
38177       continue
38178     fi
38179    ac_cv_prog_RC="rc"
38180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38181    break 2
38182  fi
38183done
38184  done
38185IFS=$as_save_IFS
38186
38187if test $ac_prog_rejected = yes; then
38188  # We found a bogon in the path, so make sure we never use it.
38189  set dummy $ac_cv_prog_RC
38190  shift
38191  if test $# != 0; then
38192    # We chose a different compiler from the bogus one.
38193    # However, it has the same basename, so the bogon will be chosen
38194    # first if we set RC to just the basename; use the full file name.
38195    shift
38196    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38197  fi
38198fi
38199fi
38200fi
38201RC=$ac_cv_prog_RC
38202if test -n "$RC"; then
38203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38204$as_echo "$RC" >&6; }
38205else
38206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38207$as_echo "no" >&6; }
38208fi
38209
38210
38211
38212  # Only process if variable expands to non-empty
38213
38214  if test "x$RC" != x; then
38215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38216
38217  # First separate the path from the arguments. This will split at the first
38218  # space.
38219  complete="$RC"
38220  path="${complete%% *}"
38221  tmp="$complete EOL"
38222  arguments="${tmp#* }"
38223
38224  # Input might be given as Windows format, start by converting to
38225  # unix format.
38226  new_path=`$CYGPATH -u "$path"`
38227
38228  # Now try to locate executable using which
38229  new_path=`$WHICH "$new_path" 2> /dev/null`
38230  # bat and cmd files are not always considered executable in cygwin causing which
38231  # to not find them
38232  if test "x$new_path" = x \
38233      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38234      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38235    new_path=`$CYGPATH -u "$path"`
38236  fi
38237  if test "x$new_path" = x; then
38238    # Oops. Which didn't find the executable.
38239    # The splitting of arguments from the executable at a space might have been incorrect,
38240    # since paths with space are more likely in Windows. Give it another try with the whole
38241    # argument.
38242    path="$complete"
38243    arguments="EOL"
38244    new_path=`$CYGPATH -u "$path"`
38245    new_path=`$WHICH "$new_path" 2> /dev/null`
38246    # bat and cmd files are not always considered executable in cygwin causing which
38247    # to not find them
38248    if test "x$new_path" = x \
38249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38251      new_path=`$CYGPATH -u "$path"`
38252    fi
38253    if test "x$new_path" = x; then
38254      # It's still not found. Now this is an unrecoverable error.
38255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38256$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38257      has_space=`$ECHO "$complete" | $GREP " "`
38258      if test "x$has_space" != x; then
38259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38261      fi
38262      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38263    fi
38264  fi
38265
38266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38269  # "foo.exe" is OK but "foo" is an error.
38270  #
38271  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38272  # It is also a way to make sure we got the proper file name for the real test later on.
38273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38274  if test "x$test_shortpath" = x; then
38275    # Short path failed, file does not exist as specified.
38276    # Try adding .exe or .cmd
38277    if test -f "${new_path}.exe"; then
38278      input_to_shortpath="${new_path}.exe"
38279    elif test -f "${new_path}.cmd"; then
38280      input_to_shortpath="${new_path}.cmd"
38281    else
38282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38283$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38284      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38285$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38286      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38287    fi
38288  else
38289    input_to_shortpath="$new_path"
38290  fi
38291
38292  # Call helper function which possibly converts this using DOS-style short mode.
38293  # If so, the updated path is stored in $new_path.
38294  new_path="$input_to_shortpath"
38295
38296  input_path="$input_to_shortpath"
38297  # Check if we need to convert this using DOS-style short mode. If the path
38298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38299  # take no chances and rewrite it.
38300  # Note: m4 eats our [], so we need to use [ and ] instead.
38301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38302  if test "x$has_forbidden_chars" != x; then
38303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38307      # Going to short mode and back again did indeed matter. Since short mode is
38308      # case insensitive, let's make it lowercase to improve readability.
38309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38310      # Now convert it back to Unix-style (cygpath)
38311      input_path=`$CYGPATH -u "$shortmode_path"`
38312      new_path="$input_path"
38313    fi
38314  fi
38315
38316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38317  if test "x$test_cygdrive_prefix" = x; then
38318    # As a simple fix, exclude /usr/bin since it's not a real path.
38319    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38321      # a path prefixed by /cygdrive for fixpath to work.
38322      new_path="$CYGWIN_ROOT_PATH$input_path"
38323    fi
38324  fi
38325
38326  # remove trailing .exe if any
38327  new_path="${new_path/%.exe/}"
38328
38329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38330
38331  # First separate the path from the arguments. This will split at the first
38332  # space.
38333  complete="$RC"
38334  path="${complete%% *}"
38335  tmp="$complete EOL"
38336  arguments="${tmp#* }"
38337
38338  # Input might be given as Windows format, start by converting to
38339  # unix format.
38340  new_path="$path"
38341
38342  windows_path="$new_path"
38343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38344    unix_path=`$CYGPATH -u "$windows_path"`
38345    new_path="$unix_path"
38346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38348    new_path="$unix_path"
38349  fi
38350
38351
38352  # Now try to locate executable using which
38353  new_path=`$WHICH "$new_path" 2> /dev/null`
38354
38355  if test "x$new_path" = x; then
38356    # Oops. Which didn't find the executable.
38357    # The splitting of arguments from the executable at a space might have been incorrect,
38358    # since paths with space are more likely in Windows. Give it another try with the whole
38359    # argument.
38360    path="$complete"
38361    arguments="EOL"
38362    new_path="$path"
38363
38364  windows_path="$new_path"
38365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38366    unix_path=`$CYGPATH -u "$windows_path"`
38367    new_path="$unix_path"
38368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38370    new_path="$unix_path"
38371  fi
38372
38373
38374    new_path=`$WHICH "$new_path" 2> /dev/null`
38375    # bat and cmd files are not always considered executable in MSYS causing which
38376    # to not find them
38377    if test "x$new_path" = x \
38378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38380      new_path="$path"
38381
38382  windows_path="$new_path"
38383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38384    unix_path=`$CYGPATH -u "$windows_path"`
38385    new_path="$unix_path"
38386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38388    new_path="$unix_path"
38389  fi
38390
38391    fi
38392
38393    if test "x$new_path" = x; then
38394      # It's still not found. Now this is an unrecoverable error.
38395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38396$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38397      has_space=`$ECHO "$complete" | $GREP " "`
38398      if test "x$has_space" != x; then
38399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38401      fi
38402      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38403    fi
38404  fi
38405
38406  # Now new_path has a complete unix path to the binary
38407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38408    # Keep paths in /bin as-is, but remove trailing .exe if any
38409    new_path="${new_path/%.exe/}"
38410    # Do not save /bin paths to all_fixpath_prefixes!
38411  else
38412    # Not in mixed or Windows style, start by that.
38413    new_path=`cmd //c echo $new_path`
38414
38415  input_path="$new_path"
38416  # Check if we need to convert this using DOS-style short mode. If the path
38417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38418  # take no chances and rewrite it.
38419  # Note: m4 eats our [], so we need to use [ and ] instead.
38420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38421  if test "x$has_forbidden_chars" != x; then
38422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38424  fi
38425
38426    # Output is in $new_path
38427
38428  windows_path="$new_path"
38429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38430    unix_path=`$CYGPATH -u "$windows_path"`
38431    new_path="$unix_path"
38432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38434    new_path="$unix_path"
38435  fi
38436
38437    # remove trailing .exe if any
38438    new_path="${new_path/%.exe/}"
38439
38440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38442  fi
38443
38444    else
38445      # We're on a unix platform. Hooray! :)
38446      # First separate the path from the arguments. This will split at the first
38447      # space.
38448      complete="$RC"
38449      path="${complete%% *}"
38450      tmp="$complete EOL"
38451      arguments="${tmp#* }"
38452
38453      # Cannot rely on the command "which" here since it doesn't always work.
38454      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38455      if test -z "$is_absolute_path"; then
38456        # Path to executable is not absolute. Find it.
38457        IFS_save="$IFS"
38458        IFS=:
38459        for p in $PATH; do
38460          if test -f "$p/$path" && test -x "$p/$path"; then
38461            new_path="$p/$path"
38462            break
38463          fi
38464        done
38465        IFS="$IFS_save"
38466      else
38467        # This is an absolute path, we can use it without further modifications.
38468        new_path="$path"
38469      fi
38470
38471      if test "x$new_path" = x; then
38472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38473$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38474        has_space=`$ECHO "$complete" | $GREP " "`
38475        if test "x$has_space" != x; then
38476          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38478        fi
38479        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38480      fi
38481    fi
38482
38483    # Now join together the path and the arguments once again
38484    if test "x$arguments" != xEOL; then
38485      new_complete="$new_path ${arguments% *}"
38486    else
38487      new_complete="$new_path"
38488    fi
38489
38490    if test "x$complete" != "x$new_complete"; then
38491      RC="$new_complete"
38492      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38493$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38494    fi
38495  fi
38496
38497    # Extract the first word of "dumpbin", so it can be a program name with args.
38498set dummy dumpbin; ac_word=$2
38499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38500$as_echo_n "checking for $ac_word... " >&6; }
38501if ${ac_cv_prog_DUMPBIN+:} false; then :
38502  $as_echo_n "(cached) " >&6
38503else
38504  if test -n "$DUMPBIN"; then
38505  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38506else
38507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38508for as_dir in $PATH
38509do
38510  IFS=$as_save_IFS
38511  test -z "$as_dir" && as_dir=.
38512    for ac_exec_ext in '' $ac_executable_extensions; do
38513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38514    ac_cv_prog_DUMPBIN="dumpbin"
38515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38516    break 2
38517  fi
38518done
38519  done
38520IFS=$as_save_IFS
38521
38522fi
38523fi
38524DUMPBIN=$ac_cv_prog_DUMPBIN
38525if test -n "$DUMPBIN"; then
38526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38527$as_echo "$DUMPBIN" >&6; }
38528else
38529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38530$as_echo "no" >&6; }
38531fi
38532
38533
38534
38535  # Only process if variable expands to non-empty
38536
38537  if test "x$DUMPBIN" != x; then
38538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38539
38540  # First separate the path from the arguments. This will split at the first
38541  # space.
38542  complete="$DUMPBIN"
38543  path="${complete%% *}"
38544  tmp="$complete EOL"
38545  arguments="${tmp#* }"
38546
38547  # Input might be given as Windows format, start by converting to
38548  # unix format.
38549  new_path=`$CYGPATH -u "$path"`
38550
38551  # Now try to locate executable using which
38552  new_path=`$WHICH "$new_path" 2> /dev/null`
38553  # bat and cmd files are not always considered executable in cygwin causing which
38554  # to not find them
38555  if test "x$new_path" = x \
38556      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38557      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38558    new_path=`$CYGPATH -u "$path"`
38559  fi
38560  if test "x$new_path" = x; then
38561    # Oops. Which didn't find the executable.
38562    # The splitting of arguments from the executable at a space might have been incorrect,
38563    # since paths with space are more likely in Windows. Give it another try with the whole
38564    # argument.
38565    path="$complete"
38566    arguments="EOL"
38567    new_path=`$CYGPATH -u "$path"`
38568    new_path=`$WHICH "$new_path" 2> /dev/null`
38569    # bat and cmd files are not always considered executable in cygwin causing which
38570    # to not find them
38571    if test "x$new_path" = x \
38572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38574      new_path=`$CYGPATH -u "$path"`
38575    fi
38576    if test "x$new_path" = x; then
38577      # It's still not found. Now this is an unrecoverable error.
38578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38579$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38580      has_space=`$ECHO "$complete" | $GREP " "`
38581      if test "x$has_space" != x; then
38582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38584      fi
38585      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38586    fi
38587  fi
38588
38589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38592  # "foo.exe" is OK but "foo" is an error.
38593  #
38594  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38595  # It is also a way to make sure we got the proper file name for the real test later on.
38596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38597  if test "x$test_shortpath" = x; then
38598    # Short path failed, file does not exist as specified.
38599    # Try adding .exe or .cmd
38600    if test -f "${new_path}.exe"; then
38601      input_to_shortpath="${new_path}.exe"
38602    elif test -f "${new_path}.cmd"; then
38603      input_to_shortpath="${new_path}.cmd"
38604    else
38605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38606$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38609      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38610    fi
38611  else
38612    input_to_shortpath="$new_path"
38613  fi
38614
38615  # Call helper function which possibly converts this using DOS-style short mode.
38616  # If so, the updated path is stored in $new_path.
38617  new_path="$input_to_shortpath"
38618
38619  input_path="$input_to_shortpath"
38620  # Check if we need to convert this using DOS-style short mode. If the path
38621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38622  # take no chances and rewrite it.
38623  # Note: m4 eats our [], so we need to use [ and ] instead.
38624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38625  if test "x$has_forbidden_chars" != x; then
38626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38630      # Going to short mode and back again did indeed matter. Since short mode is
38631      # case insensitive, let's make it lowercase to improve readability.
38632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38633      # Now convert it back to Unix-style (cygpath)
38634      input_path=`$CYGPATH -u "$shortmode_path"`
38635      new_path="$input_path"
38636    fi
38637  fi
38638
38639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38640  if test "x$test_cygdrive_prefix" = x; then
38641    # As a simple fix, exclude /usr/bin since it's not a real path.
38642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38644      # a path prefixed by /cygdrive for fixpath to work.
38645      new_path="$CYGWIN_ROOT_PATH$input_path"
38646    fi
38647  fi
38648
38649  # remove trailing .exe if any
38650  new_path="${new_path/%.exe/}"
38651
38652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38653
38654  # First separate the path from the arguments. This will split at the first
38655  # space.
38656  complete="$DUMPBIN"
38657  path="${complete%% *}"
38658  tmp="$complete EOL"
38659  arguments="${tmp#* }"
38660
38661  # Input might be given as Windows format, start by converting to
38662  # unix format.
38663  new_path="$path"
38664
38665  windows_path="$new_path"
38666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38667    unix_path=`$CYGPATH -u "$windows_path"`
38668    new_path="$unix_path"
38669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38671    new_path="$unix_path"
38672  fi
38673
38674
38675  # Now try to locate executable using which
38676  new_path=`$WHICH "$new_path" 2> /dev/null`
38677
38678  if test "x$new_path" = x; then
38679    # Oops. Which didn't find the executable.
38680    # The splitting of arguments from the executable at a space might have been incorrect,
38681    # since paths with space are more likely in Windows. Give it another try with the whole
38682    # argument.
38683    path="$complete"
38684    arguments="EOL"
38685    new_path="$path"
38686
38687  windows_path="$new_path"
38688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38689    unix_path=`$CYGPATH -u "$windows_path"`
38690    new_path="$unix_path"
38691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38693    new_path="$unix_path"
38694  fi
38695
38696
38697    new_path=`$WHICH "$new_path" 2> /dev/null`
38698    # bat and cmd files are not always considered executable in MSYS causing which
38699    # to not find them
38700    if test "x$new_path" = x \
38701        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38702        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38703      new_path="$path"
38704
38705  windows_path="$new_path"
38706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38707    unix_path=`$CYGPATH -u "$windows_path"`
38708    new_path="$unix_path"
38709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38711    new_path="$unix_path"
38712  fi
38713
38714    fi
38715
38716    if test "x$new_path" = x; then
38717      # It's still not found. Now this is an unrecoverable error.
38718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38719$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38720      has_space=`$ECHO "$complete" | $GREP " "`
38721      if test "x$has_space" != x; then
38722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38724      fi
38725      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38726    fi
38727  fi
38728
38729  # Now new_path has a complete unix path to the binary
38730  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38731    # Keep paths in /bin as-is, but remove trailing .exe if any
38732    new_path="${new_path/%.exe/}"
38733    # Do not save /bin paths to all_fixpath_prefixes!
38734  else
38735    # Not in mixed or Windows style, start by that.
38736    new_path=`cmd //c echo $new_path`
38737
38738  input_path="$new_path"
38739  # Check if we need to convert this using DOS-style short mode. If the path
38740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38741  # take no chances and rewrite it.
38742  # Note: m4 eats our [], so we need to use [ and ] instead.
38743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38744  if test "x$has_forbidden_chars" != x; then
38745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38747  fi
38748
38749    # Output is in $new_path
38750
38751  windows_path="$new_path"
38752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38753    unix_path=`$CYGPATH -u "$windows_path"`
38754    new_path="$unix_path"
38755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38757    new_path="$unix_path"
38758  fi
38759
38760    # remove trailing .exe if any
38761    new_path="${new_path/%.exe/}"
38762
38763    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38764    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38765  fi
38766
38767    else
38768      # We're on a unix platform. Hooray! :)
38769      # First separate the path from the arguments. This will split at the first
38770      # space.
38771      complete="$DUMPBIN"
38772      path="${complete%% *}"
38773      tmp="$complete EOL"
38774      arguments="${tmp#* }"
38775
38776      # Cannot rely on the command "which" here since it doesn't always work.
38777      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38778      if test -z "$is_absolute_path"; then
38779        # Path to executable is not absolute. Find it.
38780        IFS_save="$IFS"
38781        IFS=:
38782        for p in $PATH; do
38783          if test -f "$p/$path" && test -x "$p/$path"; then
38784            new_path="$p/$path"
38785            break
38786          fi
38787        done
38788        IFS="$IFS_save"
38789      else
38790        # This is an absolute path, we can use it without further modifications.
38791        new_path="$path"
38792      fi
38793
38794      if test "x$new_path" = x; then
38795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38796$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38797        has_space=`$ECHO "$complete" | $GREP " "`
38798        if test "x$has_space" != x; then
38799          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38800$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38801        fi
38802        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38803      fi
38804    fi
38805
38806    # Now join together the path and the arguments once again
38807    if test "x$arguments" != xEOL; then
38808      new_complete="$new_path ${arguments% *}"
38809    else
38810      new_complete="$new_path"
38811    fi
38812
38813    if test "x$complete" != "x$new_complete"; then
38814      DUMPBIN="$new_complete"
38815      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38816$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38817    fi
38818  fi
38819
38820    # We need to check for 'msbuild.exe' because at the place where we expect to
38821    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38822    # won't find the 'msbuild.exe' executable in that case (and the
38823    # 'ac_executable_extensions' is unusable due to performance reasons).
38824    # Notice that we intentionally don't fix up the path to MSBUILD because we
38825    # will call it in a DOS shell during freetype detection on Windows (see
38826    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38827    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38828set dummy msbuild.exe; ac_word=$2
38829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38830$as_echo_n "checking for $ac_word... " >&6; }
38831if ${ac_cv_prog_MSBUILD+:} false; then :
38832  $as_echo_n "(cached) " >&6
38833else
38834  if test -n "$MSBUILD"; then
38835  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38836else
38837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38838for as_dir in $PATH
38839do
38840  IFS=$as_save_IFS
38841  test -z "$as_dir" && as_dir=.
38842    for ac_exec_ext in '' $ac_executable_extensions; do
38843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38844    ac_cv_prog_MSBUILD="msbuild.exe"
38845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38846    break 2
38847  fi
38848done
38849  done
38850IFS=$as_save_IFS
38851
38852fi
38853fi
38854MSBUILD=$ac_cv_prog_MSBUILD
38855if test -n "$MSBUILD"; then
38856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38857$as_echo "$MSBUILD" >&6; }
38858else
38859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38860$as_echo "no" >&6; }
38861fi
38862
38863
38864  fi
38865
38866  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38867
38868
38869  # Publish this variable in the help.
38870
38871
38872  if [ -z "${STRIP+x}" ]; then
38873    # The variable is not set by user, try to locate tool using the code snippet
38874    for ac_prog in strip
38875do
38876  # Extract the first word of "$ac_prog", so it can be a program name with args.
38877set dummy $ac_prog; ac_word=$2
38878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38879$as_echo_n "checking for $ac_word... " >&6; }
38880if ${ac_cv_path_STRIP+:} false; then :
38881  $as_echo_n "(cached) " >&6
38882else
38883  case $STRIP in
38884  [\\/]* | ?:[\\/]*)
38885  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38886  ;;
38887  *)
38888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38889for as_dir in $PATH
38890do
38891  IFS=$as_save_IFS
38892  test -z "$as_dir" && as_dir=.
38893    for ac_exec_ext in '' $ac_executable_extensions; do
38894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38895    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38897    break 2
38898  fi
38899done
38900  done
38901IFS=$as_save_IFS
38902
38903  ;;
38904esac
38905fi
38906STRIP=$ac_cv_path_STRIP
38907if test -n "$STRIP"; then
38908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38909$as_echo "$STRIP" >&6; }
38910else
38911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38912$as_echo "no" >&6; }
38913fi
38914
38915
38916  test -n "$STRIP" && break
38917done
38918
38919  else
38920    # The variable is set, but is it from the command line or the environment?
38921
38922    # Try to remove the string !STRIP! from our list.
38923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38925      # If it failed, the variable was not from the command line. Ignore it,
38926      # but warn the user (except for BASH, which is always set by the calling BASH).
38927      if test "xSTRIP" != xBASH; then
38928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38929$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38930      fi
38931      # Try to locate tool using the code snippet
38932      for ac_prog in strip
38933do
38934  # Extract the first word of "$ac_prog", so it can be a program name with args.
38935set dummy $ac_prog; ac_word=$2
38936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38937$as_echo_n "checking for $ac_word... " >&6; }
38938if ${ac_cv_path_STRIP+:} false; then :
38939  $as_echo_n "(cached) " >&6
38940else
38941  case $STRIP in
38942  [\\/]* | ?:[\\/]*)
38943  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38944  ;;
38945  *)
38946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38947for as_dir in $PATH
38948do
38949  IFS=$as_save_IFS
38950  test -z "$as_dir" && as_dir=.
38951    for ac_exec_ext in '' $ac_executable_extensions; do
38952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38953    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38955    break 2
38956  fi
38957done
38958  done
38959IFS=$as_save_IFS
38960
38961  ;;
38962esac
38963fi
38964STRIP=$ac_cv_path_STRIP
38965if test -n "$STRIP"; then
38966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38967$as_echo "$STRIP" >&6; }
38968else
38969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38970$as_echo "no" >&6; }
38971fi
38972
38973
38974  test -n "$STRIP" && break
38975done
38976
38977    else
38978      # If it succeeded, then it was overridden by the user. We will use it
38979      # for the tool.
38980
38981      # First remove it from the list of overridden variables, so we can test
38982      # for unknown variables in the end.
38983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38984
38985      # Check if we try to supply an empty value
38986      if test "x$STRIP" = x; then
38987        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38988$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38990$as_echo_n "checking for STRIP... " >&6; }
38991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38992$as_echo "disabled" >&6; }
38993      else
38994        # Check if the provided tool contains a complete path.
38995        tool_specified="$STRIP"
38996        tool_basename="${tool_specified##*/}"
38997        if test "x$tool_basename" = "x$tool_specified"; then
38998          # A command without a complete path is provided, search $PATH.
38999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39000$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39001          # Extract the first word of "$tool_basename", so it can be a program name with args.
39002set dummy $tool_basename; ac_word=$2
39003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39004$as_echo_n "checking for $ac_word... " >&6; }
39005if ${ac_cv_path_STRIP+:} false; then :
39006  $as_echo_n "(cached) " >&6
39007else
39008  case $STRIP in
39009  [\\/]* | ?:[\\/]*)
39010  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39011  ;;
39012  *)
39013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39014for as_dir in $PATH
39015do
39016  IFS=$as_save_IFS
39017  test -z "$as_dir" && as_dir=.
39018    for ac_exec_ext in '' $ac_executable_extensions; do
39019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39020    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39022    break 2
39023  fi
39024done
39025  done
39026IFS=$as_save_IFS
39027
39028  ;;
39029esac
39030fi
39031STRIP=$ac_cv_path_STRIP
39032if test -n "$STRIP"; then
39033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39034$as_echo "$STRIP" >&6; }
39035else
39036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39037$as_echo "no" >&6; }
39038fi
39039
39040
39041          if test "x$STRIP" = x; then
39042            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39043          fi
39044        else
39045          # Otherwise we believe it is a complete path. Use it as it is.
39046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39047$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39048          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39049$as_echo_n "checking for STRIP... " >&6; }
39050          if test ! -x "$tool_specified"; then
39051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39052$as_echo "not found" >&6; }
39053            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39054          fi
39055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39056$as_echo "$tool_specified" >&6; }
39057        fi
39058      fi
39059    fi
39060
39061  fi
39062
39063
39064
39065  # Only process if variable expands to non-empty
39066
39067  if test "x$STRIP" != x; then
39068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39069
39070  # First separate the path from the arguments. This will split at the first
39071  # space.
39072  complete="$STRIP"
39073  path="${complete%% *}"
39074  tmp="$complete EOL"
39075  arguments="${tmp#* }"
39076
39077  # Input might be given as Windows format, start by converting to
39078  # unix format.
39079  new_path=`$CYGPATH -u "$path"`
39080
39081  # Now try to locate executable using which
39082  new_path=`$WHICH "$new_path" 2> /dev/null`
39083  # bat and cmd files are not always considered executable in cygwin causing which
39084  # to not find them
39085  if test "x$new_path" = x \
39086      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39087      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39088    new_path=`$CYGPATH -u "$path"`
39089  fi
39090  if test "x$new_path" = x; then
39091    # Oops. Which didn't find the executable.
39092    # The splitting of arguments from the executable at a space might have been incorrect,
39093    # since paths with space are more likely in Windows. Give it another try with the whole
39094    # argument.
39095    path="$complete"
39096    arguments="EOL"
39097    new_path=`$CYGPATH -u "$path"`
39098    new_path=`$WHICH "$new_path" 2> /dev/null`
39099    # bat and cmd files are not always considered executable in cygwin causing which
39100    # to not find them
39101    if test "x$new_path" = x \
39102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39104      new_path=`$CYGPATH -u "$path"`
39105    fi
39106    if test "x$new_path" = x; then
39107      # It's still not found. Now this is an unrecoverable error.
39108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39109$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39110      has_space=`$ECHO "$complete" | $GREP " "`
39111      if test "x$has_space" != x; then
39112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39114      fi
39115      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39116    fi
39117  fi
39118
39119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39122  # "foo.exe" is OK but "foo" is an error.
39123  #
39124  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39125  # It is also a way to make sure we got the proper file name for the real test later on.
39126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39127  if test "x$test_shortpath" = x; then
39128    # Short path failed, file does not exist as specified.
39129    # Try adding .exe or .cmd
39130    if test -f "${new_path}.exe"; then
39131      input_to_shortpath="${new_path}.exe"
39132    elif test -f "${new_path}.cmd"; then
39133      input_to_shortpath="${new_path}.cmd"
39134    else
39135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39136$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39137      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39138$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39139      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39140    fi
39141  else
39142    input_to_shortpath="$new_path"
39143  fi
39144
39145  # Call helper function which possibly converts this using DOS-style short mode.
39146  # If so, the updated path is stored in $new_path.
39147  new_path="$input_to_shortpath"
39148
39149  input_path="$input_to_shortpath"
39150  # Check if we need to convert this using DOS-style short mode. If the path
39151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39152  # take no chances and rewrite it.
39153  # Note: m4 eats our [], so we need to use [ and ] instead.
39154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39155  if test "x$has_forbidden_chars" != x; then
39156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39160      # Going to short mode and back again did indeed matter. Since short mode is
39161      # case insensitive, let's make it lowercase to improve readability.
39162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39163      # Now convert it back to Unix-style (cygpath)
39164      input_path=`$CYGPATH -u "$shortmode_path"`
39165      new_path="$input_path"
39166    fi
39167  fi
39168
39169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39170  if test "x$test_cygdrive_prefix" = x; then
39171    # As a simple fix, exclude /usr/bin since it's not a real path.
39172    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39174      # a path prefixed by /cygdrive for fixpath to work.
39175      new_path="$CYGWIN_ROOT_PATH$input_path"
39176    fi
39177  fi
39178
39179  # remove trailing .exe if any
39180  new_path="${new_path/%.exe/}"
39181
39182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39183
39184  # First separate the path from the arguments. This will split at the first
39185  # space.
39186  complete="$STRIP"
39187  path="${complete%% *}"
39188  tmp="$complete EOL"
39189  arguments="${tmp#* }"
39190
39191  # Input might be given as Windows format, start by converting to
39192  # unix format.
39193  new_path="$path"
39194
39195  windows_path="$new_path"
39196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39197    unix_path=`$CYGPATH -u "$windows_path"`
39198    new_path="$unix_path"
39199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39201    new_path="$unix_path"
39202  fi
39203
39204
39205  # Now try to locate executable using which
39206  new_path=`$WHICH "$new_path" 2> /dev/null`
39207
39208  if test "x$new_path" = x; then
39209    # Oops. Which didn't find the executable.
39210    # The splitting of arguments from the executable at a space might have been incorrect,
39211    # since paths with space are more likely in Windows. Give it another try with the whole
39212    # argument.
39213    path="$complete"
39214    arguments="EOL"
39215    new_path="$path"
39216
39217  windows_path="$new_path"
39218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39219    unix_path=`$CYGPATH -u "$windows_path"`
39220    new_path="$unix_path"
39221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39223    new_path="$unix_path"
39224  fi
39225
39226
39227    new_path=`$WHICH "$new_path" 2> /dev/null`
39228    # bat and cmd files are not always considered executable in MSYS causing which
39229    # to not find them
39230    if test "x$new_path" = x \
39231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39233      new_path="$path"
39234
39235  windows_path="$new_path"
39236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39237    unix_path=`$CYGPATH -u "$windows_path"`
39238    new_path="$unix_path"
39239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39241    new_path="$unix_path"
39242  fi
39243
39244    fi
39245
39246    if test "x$new_path" = x; then
39247      # It's still not found. Now this is an unrecoverable error.
39248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39249$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39250      has_space=`$ECHO "$complete" | $GREP " "`
39251      if test "x$has_space" != x; then
39252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39254      fi
39255      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39256    fi
39257  fi
39258
39259  # Now new_path has a complete unix path to the binary
39260  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39261    # Keep paths in /bin as-is, but remove trailing .exe if any
39262    new_path="${new_path/%.exe/}"
39263    # Do not save /bin paths to all_fixpath_prefixes!
39264  else
39265    # Not in mixed or Windows style, start by that.
39266    new_path=`cmd //c echo $new_path`
39267
39268  input_path="$new_path"
39269  # Check if we need to convert this using DOS-style short mode. If the path
39270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39271  # take no chances and rewrite it.
39272  # Note: m4 eats our [], so we need to use [ and ] instead.
39273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39274  if test "x$has_forbidden_chars" != x; then
39275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39277  fi
39278
39279    # Output is in $new_path
39280
39281  windows_path="$new_path"
39282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39283    unix_path=`$CYGPATH -u "$windows_path"`
39284    new_path="$unix_path"
39285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39287    new_path="$unix_path"
39288  fi
39289
39290    # remove trailing .exe if any
39291    new_path="${new_path/%.exe/}"
39292
39293    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39294    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39295  fi
39296
39297    else
39298      # We're on a unix platform. Hooray! :)
39299      # First separate the path from the arguments. This will split at the first
39300      # space.
39301      complete="$STRIP"
39302      path="${complete%% *}"
39303      tmp="$complete EOL"
39304      arguments="${tmp#* }"
39305
39306      # Cannot rely on the command "which" here since it doesn't always work.
39307      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39308      if test -z "$is_absolute_path"; then
39309        # Path to executable is not absolute. Find it.
39310        IFS_save="$IFS"
39311        IFS=:
39312        for p in $PATH; do
39313          if test -f "$p/$path" && test -x "$p/$path"; then
39314            new_path="$p/$path"
39315            break
39316          fi
39317        done
39318        IFS="$IFS_save"
39319      else
39320        # This is an absolute path, we can use it without further modifications.
39321        new_path="$path"
39322      fi
39323
39324      if test "x$new_path" = x; then
39325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39326$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39327        has_space=`$ECHO "$complete" | $GREP " "`
39328        if test "x$has_space" != x; then
39329          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39330$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39331        fi
39332        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39333      fi
39334    fi
39335
39336    # Now join together the path and the arguments once again
39337    if test "x$arguments" != xEOL; then
39338      new_complete="$new_path ${arguments% *}"
39339    else
39340      new_complete="$new_path"
39341    fi
39342
39343    if test "x$complete" != "x$new_complete"; then
39344      STRIP="$new_complete"
39345      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39346$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39347    fi
39348  fi
39349
39350
39351
39352  # Publish this variable in the help.
39353
39354
39355  if [ -z "${NM+x}" ]; then
39356    # The variable is not set by user, try to locate tool using the code snippet
39357    for ac_prog in nm
39358do
39359  # Extract the first word of "$ac_prog", so it can be a program name with args.
39360set dummy $ac_prog; ac_word=$2
39361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39362$as_echo_n "checking for $ac_word... " >&6; }
39363if ${ac_cv_path_NM+:} false; then :
39364  $as_echo_n "(cached) " >&6
39365else
39366  case $NM in
39367  [\\/]* | ?:[\\/]*)
39368  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39369  ;;
39370  *)
39371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39372for as_dir in $PATH
39373do
39374  IFS=$as_save_IFS
39375  test -z "$as_dir" && as_dir=.
39376    for ac_exec_ext in '' $ac_executable_extensions; do
39377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39378    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39380    break 2
39381  fi
39382done
39383  done
39384IFS=$as_save_IFS
39385
39386  ;;
39387esac
39388fi
39389NM=$ac_cv_path_NM
39390if test -n "$NM"; then
39391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39392$as_echo "$NM" >&6; }
39393else
39394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39395$as_echo "no" >&6; }
39396fi
39397
39398
39399  test -n "$NM" && break
39400done
39401
39402  else
39403    # The variable is set, but is it from the command line or the environment?
39404
39405    # Try to remove the string !NM! from our list.
39406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39408      # If it failed, the variable was not from the command line. Ignore it,
39409      # but warn the user (except for BASH, which is always set by the calling BASH).
39410      if test "xNM" != xBASH; then
39411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39412$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39413      fi
39414      # Try to locate tool using the code snippet
39415      for ac_prog in nm
39416do
39417  # Extract the first word of "$ac_prog", so it can be a program name with args.
39418set dummy $ac_prog; ac_word=$2
39419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39420$as_echo_n "checking for $ac_word... " >&6; }
39421if ${ac_cv_path_NM+:} false; then :
39422  $as_echo_n "(cached) " >&6
39423else
39424  case $NM in
39425  [\\/]* | ?:[\\/]*)
39426  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39427  ;;
39428  *)
39429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39430for as_dir in $PATH
39431do
39432  IFS=$as_save_IFS
39433  test -z "$as_dir" && as_dir=.
39434    for ac_exec_ext in '' $ac_executable_extensions; do
39435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39436    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39438    break 2
39439  fi
39440done
39441  done
39442IFS=$as_save_IFS
39443
39444  ;;
39445esac
39446fi
39447NM=$ac_cv_path_NM
39448if test -n "$NM"; then
39449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39450$as_echo "$NM" >&6; }
39451else
39452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39453$as_echo "no" >&6; }
39454fi
39455
39456
39457  test -n "$NM" && break
39458done
39459
39460    else
39461      # If it succeeded, then it was overridden by the user. We will use it
39462      # for the tool.
39463
39464      # First remove it from the list of overridden variables, so we can test
39465      # for unknown variables in the end.
39466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39467
39468      # Check if we try to supply an empty value
39469      if test "x$NM" = x; then
39470        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39471$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39473$as_echo_n "checking for NM... " >&6; }
39474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39475$as_echo "disabled" >&6; }
39476      else
39477        # Check if the provided tool contains a complete path.
39478        tool_specified="$NM"
39479        tool_basename="${tool_specified##*/}"
39480        if test "x$tool_basename" = "x$tool_specified"; then
39481          # A command without a complete path is provided, search $PATH.
39482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39483$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39484          # Extract the first word of "$tool_basename", so it can be a program name with args.
39485set dummy $tool_basename; ac_word=$2
39486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39487$as_echo_n "checking for $ac_word... " >&6; }
39488if ${ac_cv_path_NM+:} false; then :
39489  $as_echo_n "(cached) " >&6
39490else
39491  case $NM in
39492  [\\/]* | ?:[\\/]*)
39493  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39494  ;;
39495  *)
39496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39497for as_dir in $PATH
39498do
39499  IFS=$as_save_IFS
39500  test -z "$as_dir" && as_dir=.
39501    for ac_exec_ext in '' $ac_executable_extensions; do
39502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39503    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39505    break 2
39506  fi
39507done
39508  done
39509IFS=$as_save_IFS
39510
39511  ;;
39512esac
39513fi
39514NM=$ac_cv_path_NM
39515if test -n "$NM"; then
39516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39517$as_echo "$NM" >&6; }
39518else
39519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39520$as_echo "no" >&6; }
39521fi
39522
39523
39524          if test "x$NM" = x; then
39525            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39526          fi
39527        else
39528          # Otherwise we believe it is a complete path. Use it as it is.
39529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39530$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39531          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39532$as_echo_n "checking for NM... " >&6; }
39533          if test ! -x "$tool_specified"; then
39534            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39535$as_echo "not found" >&6; }
39536            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39537          fi
39538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39539$as_echo "$tool_specified" >&6; }
39540        fi
39541      fi
39542    fi
39543
39544  fi
39545
39546
39547
39548  # Only process if variable expands to non-empty
39549
39550  if test "x$NM" != x; then
39551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39552
39553  # First separate the path from the arguments. This will split at the first
39554  # space.
39555  complete="$NM"
39556  path="${complete%% *}"
39557  tmp="$complete EOL"
39558  arguments="${tmp#* }"
39559
39560  # Input might be given as Windows format, start by converting to
39561  # unix format.
39562  new_path=`$CYGPATH -u "$path"`
39563
39564  # Now try to locate executable using which
39565  new_path=`$WHICH "$new_path" 2> /dev/null`
39566  # bat and cmd files are not always considered executable in cygwin causing which
39567  # to not find them
39568  if test "x$new_path" = x \
39569      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39570      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39571    new_path=`$CYGPATH -u "$path"`
39572  fi
39573  if test "x$new_path" = x; then
39574    # Oops. Which didn't find the executable.
39575    # The splitting of arguments from the executable at a space might have been incorrect,
39576    # since paths with space are more likely in Windows. Give it another try with the whole
39577    # argument.
39578    path="$complete"
39579    arguments="EOL"
39580    new_path=`$CYGPATH -u "$path"`
39581    new_path=`$WHICH "$new_path" 2> /dev/null`
39582    # bat and cmd files are not always considered executable in cygwin causing which
39583    # to not find them
39584    if test "x$new_path" = x \
39585        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39586        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39587      new_path=`$CYGPATH -u "$path"`
39588    fi
39589    if test "x$new_path" = x; then
39590      # It's still not found. Now this is an unrecoverable error.
39591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39592$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39593      has_space=`$ECHO "$complete" | $GREP " "`
39594      if test "x$has_space" != x; then
39595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39597      fi
39598      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39599    fi
39600  fi
39601
39602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39605  # "foo.exe" is OK but "foo" is an error.
39606  #
39607  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39608  # It is also a way to make sure we got the proper file name for the real test later on.
39609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39610  if test "x$test_shortpath" = x; then
39611    # Short path failed, file does not exist as specified.
39612    # Try adding .exe or .cmd
39613    if test -f "${new_path}.exe"; then
39614      input_to_shortpath="${new_path}.exe"
39615    elif test -f "${new_path}.cmd"; then
39616      input_to_shortpath="${new_path}.cmd"
39617    else
39618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39619$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39620      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39621$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39622      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39623    fi
39624  else
39625    input_to_shortpath="$new_path"
39626  fi
39627
39628  # Call helper function which possibly converts this using DOS-style short mode.
39629  # If so, the updated path is stored in $new_path.
39630  new_path="$input_to_shortpath"
39631
39632  input_path="$input_to_shortpath"
39633  # Check if we need to convert this using DOS-style short mode. If the path
39634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39635  # take no chances and rewrite it.
39636  # Note: m4 eats our [], so we need to use [ and ] instead.
39637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39638  if test "x$has_forbidden_chars" != x; then
39639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39643      # Going to short mode and back again did indeed matter. Since short mode is
39644      # case insensitive, let's make it lowercase to improve readability.
39645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39646      # Now convert it back to Unix-style (cygpath)
39647      input_path=`$CYGPATH -u "$shortmode_path"`
39648      new_path="$input_path"
39649    fi
39650  fi
39651
39652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39653  if test "x$test_cygdrive_prefix" = x; then
39654    # As a simple fix, exclude /usr/bin since it's not a real path.
39655    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39657      # a path prefixed by /cygdrive for fixpath to work.
39658      new_path="$CYGWIN_ROOT_PATH$input_path"
39659    fi
39660  fi
39661
39662  # remove trailing .exe if any
39663  new_path="${new_path/%.exe/}"
39664
39665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39666
39667  # First separate the path from the arguments. This will split at the first
39668  # space.
39669  complete="$NM"
39670  path="${complete%% *}"
39671  tmp="$complete EOL"
39672  arguments="${tmp#* }"
39673
39674  # Input might be given as Windows format, start by converting to
39675  # unix format.
39676  new_path="$path"
39677
39678  windows_path="$new_path"
39679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39680    unix_path=`$CYGPATH -u "$windows_path"`
39681    new_path="$unix_path"
39682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39684    new_path="$unix_path"
39685  fi
39686
39687
39688  # Now try to locate executable using which
39689  new_path=`$WHICH "$new_path" 2> /dev/null`
39690
39691  if test "x$new_path" = x; then
39692    # Oops. Which didn't find the executable.
39693    # The splitting of arguments from the executable at a space might have been incorrect,
39694    # since paths with space are more likely in Windows. Give it another try with the whole
39695    # argument.
39696    path="$complete"
39697    arguments="EOL"
39698    new_path="$path"
39699
39700  windows_path="$new_path"
39701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39702    unix_path=`$CYGPATH -u "$windows_path"`
39703    new_path="$unix_path"
39704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39706    new_path="$unix_path"
39707  fi
39708
39709
39710    new_path=`$WHICH "$new_path" 2> /dev/null`
39711    # bat and cmd files are not always considered executable in MSYS causing which
39712    # to not find them
39713    if test "x$new_path" = x \
39714        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39715        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39716      new_path="$path"
39717
39718  windows_path="$new_path"
39719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39720    unix_path=`$CYGPATH -u "$windows_path"`
39721    new_path="$unix_path"
39722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39724    new_path="$unix_path"
39725  fi
39726
39727    fi
39728
39729    if test "x$new_path" = x; then
39730      # It's still not found. Now this is an unrecoverable error.
39731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39732$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39733      has_space=`$ECHO "$complete" | $GREP " "`
39734      if test "x$has_space" != x; then
39735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39737      fi
39738      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39739    fi
39740  fi
39741
39742  # Now new_path has a complete unix path to the binary
39743  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39744    # Keep paths in /bin as-is, but remove trailing .exe if any
39745    new_path="${new_path/%.exe/}"
39746    # Do not save /bin paths to all_fixpath_prefixes!
39747  else
39748    # Not in mixed or Windows style, start by that.
39749    new_path=`cmd //c echo $new_path`
39750
39751  input_path="$new_path"
39752  # Check if we need to convert this using DOS-style short mode. If the path
39753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39754  # take no chances and rewrite it.
39755  # Note: m4 eats our [], so we need to use [ and ] instead.
39756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39757  if test "x$has_forbidden_chars" != x; then
39758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39760  fi
39761
39762    # Output is in $new_path
39763
39764  windows_path="$new_path"
39765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39766    unix_path=`$CYGPATH -u "$windows_path"`
39767    new_path="$unix_path"
39768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39770    new_path="$unix_path"
39771  fi
39772
39773    # remove trailing .exe if any
39774    new_path="${new_path/%.exe/}"
39775
39776    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39777    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39778  fi
39779
39780    else
39781      # We're on a unix platform. Hooray! :)
39782      # First separate the path from the arguments. This will split at the first
39783      # space.
39784      complete="$NM"
39785      path="${complete%% *}"
39786      tmp="$complete EOL"
39787      arguments="${tmp#* }"
39788
39789      # Cannot rely on the command "which" here since it doesn't always work.
39790      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39791      if test -z "$is_absolute_path"; then
39792        # Path to executable is not absolute. Find it.
39793        IFS_save="$IFS"
39794        IFS=:
39795        for p in $PATH; do
39796          if test -f "$p/$path" && test -x "$p/$path"; then
39797            new_path="$p/$path"
39798            break
39799          fi
39800        done
39801        IFS="$IFS_save"
39802      else
39803        # This is an absolute path, we can use it without further modifications.
39804        new_path="$path"
39805      fi
39806
39807      if test "x$new_path" = x; then
39808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39809$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39810        has_space=`$ECHO "$complete" | $GREP " "`
39811        if test "x$has_space" != x; then
39812          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39813$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39814        fi
39815        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39816      fi
39817    fi
39818
39819    # Now join together the path and the arguments once again
39820    if test "x$arguments" != xEOL; then
39821      new_complete="$new_path ${arguments% *}"
39822    else
39823      new_complete="$new_path"
39824    fi
39825
39826    if test "x$complete" != "x$new_complete"; then
39827      NM="$new_complete"
39828      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39829$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39830    fi
39831  fi
39832
39833
39834
39835  # Publish this variable in the help.
39836
39837
39838  if [ -z "${GNM+x}" ]; then
39839    # The variable is not set by user, try to locate tool using the code snippet
39840    for ac_prog in gnm
39841do
39842  # Extract the first word of "$ac_prog", so it can be a program name with args.
39843set dummy $ac_prog; ac_word=$2
39844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39845$as_echo_n "checking for $ac_word... " >&6; }
39846if ${ac_cv_path_GNM+:} false; then :
39847  $as_echo_n "(cached) " >&6
39848else
39849  case $GNM in
39850  [\\/]* | ?:[\\/]*)
39851  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39852  ;;
39853  *)
39854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39855for as_dir in $PATH
39856do
39857  IFS=$as_save_IFS
39858  test -z "$as_dir" && as_dir=.
39859    for ac_exec_ext in '' $ac_executable_extensions; do
39860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39861    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39863    break 2
39864  fi
39865done
39866  done
39867IFS=$as_save_IFS
39868
39869  ;;
39870esac
39871fi
39872GNM=$ac_cv_path_GNM
39873if test -n "$GNM"; then
39874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39875$as_echo "$GNM" >&6; }
39876else
39877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39878$as_echo "no" >&6; }
39879fi
39880
39881
39882  test -n "$GNM" && break
39883done
39884
39885  else
39886    # The variable is set, but is it from the command line or the environment?
39887
39888    # Try to remove the string !GNM! from our list.
39889    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39890    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39891      # If it failed, the variable was not from the command line. Ignore it,
39892      # but warn the user (except for BASH, which is always set by the calling BASH).
39893      if test "xGNM" != xBASH; then
39894        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39895$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39896      fi
39897      # Try to locate tool using the code snippet
39898      for ac_prog in gnm
39899do
39900  # Extract the first word of "$ac_prog", so it can be a program name with args.
39901set dummy $ac_prog; ac_word=$2
39902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39903$as_echo_n "checking for $ac_word... " >&6; }
39904if ${ac_cv_path_GNM+:} false; then :
39905  $as_echo_n "(cached) " >&6
39906else
39907  case $GNM in
39908  [\\/]* | ?:[\\/]*)
39909  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39910  ;;
39911  *)
39912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39913for as_dir in $PATH
39914do
39915  IFS=$as_save_IFS
39916  test -z "$as_dir" && as_dir=.
39917    for ac_exec_ext in '' $ac_executable_extensions; do
39918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39919    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39921    break 2
39922  fi
39923done
39924  done
39925IFS=$as_save_IFS
39926
39927  ;;
39928esac
39929fi
39930GNM=$ac_cv_path_GNM
39931if test -n "$GNM"; then
39932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39933$as_echo "$GNM" >&6; }
39934else
39935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39936$as_echo "no" >&6; }
39937fi
39938
39939
39940  test -n "$GNM" && break
39941done
39942
39943    else
39944      # If it succeeded, then it was overridden by the user. We will use it
39945      # for the tool.
39946
39947      # First remove it from the list of overridden variables, so we can test
39948      # for unknown variables in the end.
39949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39950
39951      # Check if we try to supply an empty value
39952      if test "x$GNM" = x; then
39953        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39954$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39956$as_echo_n "checking for GNM... " >&6; }
39957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39958$as_echo "disabled" >&6; }
39959      else
39960        # Check if the provided tool contains a complete path.
39961        tool_specified="$GNM"
39962        tool_basename="${tool_specified##*/}"
39963        if test "x$tool_basename" = "x$tool_specified"; then
39964          # A command without a complete path is provided, search $PATH.
39965          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39966$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39967          # Extract the first word of "$tool_basename", so it can be a program name with args.
39968set dummy $tool_basename; ac_word=$2
39969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39970$as_echo_n "checking for $ac_word... " >&6; }
39971if ${ac_cv_path_GNM+:} false; then :
39972  $as_echo_n "(cached) " >&6
39973else
39974  case $GNM in
39975  [\\/]* | ?:[\\/]*)
39976  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39977  ;;
39978  *)
39979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39980for as_dir in $PATH
39981do
39982  IFS=$as_save_IFS
39983  test -z "$as_dir" && as_dir=.
39984    for ac_exec_ext in '' $ac_executable_extensions; do
39985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39986    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39988    break 2
39989  fi
39990done
39991  done
39992IFS=$as_save_IFS
39993
39994  ;;
39995esac
39996fi
39997GNM=$ac_cv_path_GNM
39998if test -n "$GNM"; then
39999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40000$as_echo "$GNM" >&6; }
40001else
40002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40003$as_echo "no" >&6; }
40004fi
40005
40006
40007          if test "x$GNM" = x; then
40008            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40009          fi
40010        else
40011          # Otherwise we believe it is a complete path. Use it as it is.
40012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40013$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40014          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40015$as_echo_n "checking for GNM... " >&6; }
40016          if test ! -x "$tool_specified"; then
40017            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40018$as_echo "not found" >&6; }
40019            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40020          fi
40021          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40022$as_echo "$tool_specified" >&6; }
40023        fi
40024      fi
40025    fi
40026
40027  fi
40028
40029
40030
40031  # Only process if variable expands to non-empty
40032
40033  if test "x$GNM" != x; then
40034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40035
40036  # First separate the path from the arguments. This will split at the first
40037  # space.
40038  complete="$GNM"
40039  path="${complete%% *}"
40040  tmp="$complete EOL"
40041  arguments="${tmp#* }"
40042
40043  # Input might be given as Windows format, start by converting to
40044  # unix format.
40045  new_path=`$CYGPATH -u "$path"`
40046
40047  # Now try to locate executable using which
40048  new_path=`$WHICH "$new_path" 2> /dev/null`
40049  # bat and cmd files are not always considered executable in cygwin causing which
40050  # to not find them
40051  if test "x$new_path" = x \
40052      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40053      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40054    new_path=`$CYGPATH -u "$path"`
40055  fi
40056  if test "x$new_path" = x; then
40057    # Oops. Which didn't find the executable.
40058    # The splitting of arguments from the executable at a space might have been incorrect,
40059    # since paths with space are more likely in Windows. Give it another try with the whole
40060    # argument.
40061    path="$complete"
40062    arguments="EOL"
40063    new_path=`$CYGPATH -u "$path"`
40064    new_path=`$WHICH "$new_path" 2> /dev/null`
40065    # bat and cmd files are not always considered executable in cygwin causing which
40066    # to not find them
40067    if test "x$new_path" = x \
40068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40070      new_path=`$CYGPATH -u "$path"`
40071    fi
40072    if test "x$new_path" = x; then
40073      # It's still not found. Now this is an unrecoverable error.
40074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40075$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40076      has_space=`$ECHO "$complete" | $GREP " "`
40077      if test "x$has_space" != x; then
40078        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40079$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40080      fi
40081      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40082    fi
40083  fi
40084
40085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40088  # "foo.exe" is OK but "foo" is an error.
40089  #
40090  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40091  # It is also a way to make sure we got the proper file name for the real test later on.
40092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40093  if test "x$test_shortpath" = x; then
40094    # Short path failed, file does not exist as specified.
40095    # Try adding .exe or .cmd
40096    if test -f "${new_path}.exe"; then
40097      input_to_shortpath="${new_path}.exe"
40098    elif test -f "${new_path}.cmd"; then
40099      input_to_shortpath="${new_path}.cmd"
40100    else
40101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40102$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40103      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40104$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40105      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40106    fi
40107  else
40108    input_to_shortpath="$new_path"
40109  fi
40110
40111  # Call helper function which possibly converts this using DOS-style short mode.
40112  # If so, the updated path is stored in $new_path.
40113  new_path="$input_to_shortpath"
40114
40115  input_path="$input_to_shortpath"
40116  # Check if we need to convert this using DOS-style short mode. If the path
40117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40118  # take no chances and rewrite it.
40119  # Note: m4 eats our [], so we need to use [ and ] instead.
40120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40121  if test "x$has_forbidden_chars" != x; then
40122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40123    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40124    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40125    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40126      # Going to short mode and back again did indeed matter. Since short mode is
40127      # case insensitive, let's make it lowercase to improve readability.
40128      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40129      # Now convert it back to Unix-style (cygpath)
40130      input_path=`$CYGPATH -u "$shortmode_path"`
40131      new_path="$input_path"
40132    fi
40133  fi
40134
40135  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40136  if test "x$test_cygdrive_prefix" = x; then
40137    # As a simple fix, exclude /usr/bin since it's not a real path.
40138    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40139      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40140      # a path prefixed by /cygdrive for fixpath to work.
40141      new_path="$CYGWIN_ROOT_PATH$input_path"
40142    fi
40143  fi
40144
40145  # remove trailing .exe if any
40146  new_path="${new_path/%.exe/}"
40147
40148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40149
40150  # First separate the path from the arguments. This will split at the first
40151  # space.
40152  complete="$GNM"
40153  path="${complete%% *}"
40154  tmp="$complete EOL"
40155  arguments="${tmp#* }"
40156
40157  # Input might be given as Windows format, start by converting to
40158  # unix format.
40159  new_path="$path"
40160
40161  windows_path="$new_path"
40162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40163    unix_path=`$CYGPATH -u "$windows_path"`
40164    new_path="$unix_path"
40165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40167    new_path="$unix_path"
40168  fi
40169
40170
40171  # Now try to locate executable using which
40172  new_path=`$WHICH "$new_path" 2> /dev/null`
40173
40174  if test "x$new_path" = x; then
40175    # Oops. Which didn't find the executable.
40176    # The splitting of arguments from the executable at a space might have been incorrect,
40177    # since paths with space are more likely in Windows. Give it another try with the whole
40178    # argument.
40179    path="$complete"
40180    arguments="EOL"
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
40193    new_path=`$WHICH "$new_path" 2> /dev/null`
40194    # bat and cmd files are not always considered executable in MSYS causing which
40195    # to not find them
40196    if test "x$new_path" = x \
40197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40199      new_path="$path"
40200
40201  windows_path="$new_path"
40202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40203    unix_path=`$CYGPATH -u "$windows_path"`
40204    new_path="$unix_path"
40205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40207    new_path="$unix_path"
40208  fi
40209
40210    fi
40211
40212    if test "x$new_path" = x; then
40213      # It's still not found. Now this is an unrecoverable error.
40214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40215$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40216      has_space=`$ECHO "$complete" | $GREP " "`
40217      if test "x$has_space" != x; then
40218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40220      fi
40221      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40222    fi
40223  fi
40224
40225  # Now new_path has a complete unix path to the binary
40226  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40227    # Keep paths in /bin as-is, but remove trailing .exe if any
40228    new_path="${new_path/%.exe/}"
40229    # Do not save /bin paths to all_fixpath_prefixes!
40230  else
40231    # Not in mixed or Windows style, start by that.
40232    new_path=`cmd //c echo $new_path`
40233
40234  input_path="$new_path"
40235  # Check if we need to convert this using DOS-style short mode. If the path
40236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40237  # take no chances and rewrite it.
40238  # Note: m4 eats our [], so we need to use [ and ] instead.
40239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40240  if test "x$has_forbidden_chars" != x; then
40241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40243  fi
40244
40245    # Output is in $new_path
40246
40247  windows_path="$new_path"
40248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40249    unix_path=`$CYGPATH -u "$windows_path"`
40250    new_path="$unix_path"
40251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40253    new_path="$unix_path"
40254  fi
40255
40256    # remove trailing .exe if any
40257    new_path="${new_path/%.exe/}"
40258
40259    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40260    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40261  fi
40262
40263    else
40264      # We're on a unix platform. Hooray! :)
40265      # First separate the path from the arguments. This will split at the first
40266      # space.
40267      complete="$GNM"
40268      path="${complete%% *}"
40269      tmp="$complete EOL"
40270      arguments="${tmp#* }"
40271
40272      # Cannot rely on the command "which" here since it doesn't always work.
40273      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40274      if test -z "$is_absolute_path"; then
40275        # Path to executable is not absolute. Find it.
40276        IFS_save="$IFS"
40277        IFS=:
40278        for p in $PATH; do
40279          if test -f "$p/$path" && test -x "$p/$path"; then
40280            new_path="$p/$path"
40281            break
40282          fi
40283        done
40284        IFS="$IFS_save"
40285      else
40286        # This is an absolute path, we can use it without further modifications.
40287        new_path="$path"
40288      fi
40289
40290      if test "x$new_path" = x; then
40291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40292$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40293        has_space=`$ECHO "$complete" | $GREP " "`
40294        if test "x$has_space" != x; then
40295          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40296$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40297        fi
40298        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40299      fi
40300    fi
40301
40302    # Now join together the path and the arguments once again
40303    if test "x$arguments" != xEOL; then
40304      new_complete="$new_path ${arguments% *}"
40305    else
40306      new_complete="$new_path"
40307    fi
40308
40309    if test "x$complete" != "x$new_complete"; then
40310      GNM="$new_complete"
40311      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40312$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40313    fi
40314  fi
40315
40316  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40317    # FIXME: we should unify this with the solaris case above.
40318
40319
40320  # Publish this variable in the help.
40321
40322
40323  if [ -z "${STRIP+x}" ]; then
40324    # The variable is not set by user, try to locate tool using the code snippet
40325    if test -n "$ac_tool_prefix"; then
40326  for ac_prog in strip
40327  do
40328    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40329set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40331$as_echo_n "checking for $ac_word... " >&6; }
40332if ${ac_cv_prog_STRIP+:} false; then :
40333  $as_echo_n "(cached) " >&6
40334else
40335  if test -n "$STRIP"; then
40336  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40337else
40338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40339for as_dir in $PATH
40340do
40341  IFS=$as_save_IFS
40342  test -z "$as_dir" && as_dir=.
40343    for ac_exec_ext in '' $ac_executable_extensions; do
40344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40345    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40347    break 2
40348  fi
40349done
40350  done
40351IFS=$as_save_IFS
40352
40353fi
40354fi
40355STRIP=$ac_cv_prog_STRIP
40356if test -n "$STRIP"; then
40357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40358$as_echo "$STRIP" >&6; }
40359else
40360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40361$as_echo "no" >&6; }
40362fi
40363
40364
40365    test -n "$STRIP" && break
40366  done
40367fi
40368if test -z "$STRIP"; then
40369  ac_ct_STRIP=$STRIP
40370  for ac_prog in strip
40371do
40372  # Extract the first word of "$ac_prog", so it can be a program name with args.
40373set dummy $ac_prog; ac_word=$2
40374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40375$as_echo_n "checking for $ac_word... " >&6; }
40376if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40377  $as_echo_n "(cached) " >&6
40378else
40379  if test -n "$ac_ct_STRIP"; then
40380  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40381else
40382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40383for as_dir in $PATH
40384do
40385  IFS=$as_save_IFS
40386  test -z "$as_dir" && as_dir=.
40387    for ac_exec_ext in '' $ac_executable_extensions; do
40388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40389    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40391    break 2
40392  fi
40393done
40394  done
40395IFS=$as_save_IFS
40396
40397fi
40398fi
40399ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40400if test -n "$ac_ct_STRIP"; then
40401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40402$as_echo "$ac_ct_STRIP" >&6; }
40403else
40404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40405$as_echo "no" >&6; }
40406fi
40407
40408
40409  test -n "$ac_ct_STRIP" && break
40410done
40411
40412  if test "x$ac_ct_STRIP" = x; then
40413    STRIP=""
40414  else
40415    case $cross_compiling:$ac_tool_warned in
40416yes:)
40417{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40418$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40419ac_tool_warned=yes ;;
40420esac
40421    STRIP=$ac_ct_STRIP
40422  fi
40423fi
40424
40425  else
40426    # The variable is set, but is it from the command line or the environment?
40427
40428    # Try to remove the string !STRIP! from our list.
40429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40431      # If it failed, the variable was not from the command line. Ignore it,
40432      # but warn the user (except for BASH, which is always set by the calling BASH).
40433      if test "xSTRIP" != xBASH; then
40434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40435$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40436      fi
40437      # Try to locate tool using the code snippet
40438      if test -n "$ac_tool_prefix"; then
40439  for ac_prog in strip
40440  do
40441    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40442set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40444$as_echo_n "checking for $ac_word... " >&6; }
40445if ${ac_cv_prog_STRIP+:} false; then :
40446  $as_echo_n "(cached) " >&6
40447else
40448  if test -n "$STRIP"; then
40449  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40450else
40451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40452for as_dir in $PATH
40453do
40454  IFS=$as_save_IFS
40455  test -z "$as_dir" && as_dir=.
40456    for ac_exec_ext in '' $ac_executable_extensions; do
40457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40458    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40460    break 2
40461  fi
40462done
40463  done
40464IFS=$as_save_IFS
40465
40466fi
40467fi
40468STRIP=$ac_cv_prog_STRIP
40469if test -n "$STRIP"; then
40470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40471$as_echo "$STRIP" >&6; }
40472else
40473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40474$as_echo "no" >&6; }
40475fi
40476
40477
40478    test -n "$STRIP" && break
40479  done
40480fi
40481if test -z "$STRIP"; then
40482  ac_ct_STRIP=$STRIP
40483  for ac_prog in strip
40484do
40485  # Extract the first word of "$ac_prog", so it can be a program name with args.
40486set dummy $ac_prog; ac_word=$2
40487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40488$as_echo_n "checking for $ac_word... " >&6; }
40489if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40490  $as_echo_n "(cached) " >&6
40491else
40492  if test -n "$ac_ct_STRIP"; then
40493  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40494else
40495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40496for as_dir in $PATH
40497do
40498  IFS=$as_save_IFS
40499  test -z "$as_dir" && as_dir=.
40500    for ac_exec_ext in '' $ac_executable_extensions; do
40501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40502    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40504    break 2
40505  fi
40506done
40507  done
40508IFS=$as_save_IFS
40509
40510fi
40511fi
40512ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40513if test -n "$ac_ct_STRIP"; then
40514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40515$as_echo "$ac_ct_STRIP" >&6; }
40516else
40517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40518$as_echo "no" >&6; }
40519fi
40520
40521
40522  test -n "$ac_ct_STRIP" && break
40523done
40524
40525  if test "x$ac_ct_STRIP" = x; then
40526    STRIP=""
40527  else
40528    case $cross_compiling:$ac_tool_warned in
40529yes:)
40530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40532ac_tool_warned=yes ;;
40533esac
40534    STRIP=$ac_ct_STRIP
40535  fi
40536fi
40537
40538    else
40539      # If it succeeded, then it was overridden by the user. We will use it
40540      # for the tool.
40541
40542      # First remove it from the list of overridden variables, so we can test
40543      # for unknown variables in the end.
40544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40545
40546      # Check if we try to supply an empty value
40547      if test "x$STRIP" = x; then
40548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40549$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40551$as_echo_n "checking for STRIP... " >&6; }
40552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40553$as_echo "disabled" >&6; }
40554      else
40555        # Check if the provided tool contains a complete path.
40556        tool_specified="$STRIP"
40557        tool_basename="${tool_specified##*/}"
40558        if test "x$tool_basename" = "x$tool_specified"; then
40559          # A command without a complete path is provided, search $PATH.
40560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40561$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40562          # Extract the first word of "$tool_basename", so it can be a program name with args.
40563set dummy $tool_basename; ac_word=$2
40564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40565$as_echo_n "checking for $ac_word... " >&6; }
40566if ${ac_cv_path_STRIP+:} false; then :
40567  $as_echo_n "(cached) " >&6
40568else
40569  case $STRIP in
40570  [\\/]* | ?:[\\/]*)
40571  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40572  ;;
40573  *)
40574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40575for as_dir in $PATH
40576do
40577  IFS=$as_save_IFS
40578  test -z "$as_dir" && as_dir=.
40579    for ac_exec_ext in '' $ac_executable_extensions; do
40580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40581    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40583    break 2
40584  fi
40585done
40586  done
40587IFS=$as_save_IFS
40588
40589  ;;
40590esac
40591fi
40592STRIP=$ac_cv_path_STRIP
40593if test -n "$STRIP"; then
40594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40595$as_echo "$STRIP" >&6; }
40596else
40597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40598$as_echo "no" >&6; }
40599fi
40600
40601
40602          if test "x$STRIP" = x; then
40603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40604          fi
40605        else
40606          # Otherwise we believe it is a complete path. Use it as it is.
40607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40608$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40610$as_echo_n "checking for STRIP... " >&6; }
40611          if test ! -x "$tool_specified"; then
40612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40613$as_echo "not found" >&6; }
40614            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40615          fi
40616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40617$as_echo "$tool_specified" >&6; }
40618        fi
40619      fi
40620    fi
40621
40622  fi
40623
40624
40625
40626  # Only process if variable expands to non-empty
40627
40628  if test "x$STRIP" != x; then
40629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40630
40631  # First separate the path from the arguments. This will split at the first
40632  # space.
40633  complete="$STRIP"
40634  path="${complete%% *}"
40635  tmp="$complete EOL"
40636  arguments="${tmp#* }"
40637
40638  # Input might be given as Windows format, start by converting to
40639  # unix format.
40640  new_path=`$CYGPATH -u "$path"`
40641
40642  # Now try to locate executable using which
40643  new_path=`$WHICH "$new_path" 2> /dev/null`
40644  # bat and cmd files are not always considered executable in cygwin causing which
40645  # to not find them
40646  if test "x$new_path" = x \
40647      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40648      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40649    new_path=`$CYGPATH -u "$path"`
40650  fi
40651  if test "x$new_path" = x; then
40652    # Oops. Which didn't find the executable.
40653    # The splitting of arguments from the executable at a space might have been incorrect,
40654    # since paths with space are more likely in Windows. Give it another try with the whole
40655    # argument.
40656    path="$complete"
40657    arguments="EOL"
40658    new_path=`$CYGPATH -u "$path"`
40659    new_path=`$WHICH "$new_path" 2> /dev/null`
40660    # bat and cmd files are not always considered executable in cygwin causing which
40661    # to not find them
40662    if test "x$new_path" = x \
40663        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40664        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40665      new_path=`$CYGPATH -u "$path"`
40666    fi
40667    if test "x$new_path" = x; then
40668      # It's still not found. Now this is an unrecoverable error.
40669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40670$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40671      has_space=`$ECHO "$complete" | $GREP " "`
40672      if test "x$has_space" != x; then
40673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40675      fi
40676      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40677    fi
40678  fi
40679
40680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40683  # "foo.exe" is OK but "foo" is an error.
40684  #
40685  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40686  # It is also a way to make sure we got the proper file name for the real test later on.
40687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40688  if test "x$test_shortpath" = x; then
40689    # Short path failed, file does not exist as specified.
40690    # Try adding .exe or .cmd
40691    if test -f "${new_path}.exe"; then
40692      input_to_shortpath="${new_path}.exe"
40693    elif test -f "${new_path}.cmd"; then
40694      input_to_shortpath="${new_path}.cmd"
40695    else
40696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40697$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40698      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40699$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40700      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40701    fi
40702  else
40703    input_to_shortpath="$new_path"
40704  fi
40705
40706  # Call helper function which possibly converts this using DOS-style short mode.
40707  # If so, the updated path is stored in $new_path.
40708  new_path="$input_to_shortpath"
40709
40710  input_path="$input_to_shortpath"
40711  # Check if we need to convert this using DOS-style short mode. If the path
40712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40713  # take no chances and rewrite it.
40714  # Note: m4 eats our [], so we need to use [ and ] instead.
40715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40716  if test "x$has_forbidden_chars" != x; then
40717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40721      # Going to short mode and back again did indeed matter. Since short mode is
40722      # case insensitive, let's make it lowercase to improve readability.
40723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40724      # Now convert it back to Unix-style (cygpath)
40725      input_path=`$CYGPATH -u "$shortmode_path"`
40726      new_path="$input_path"
40727    fi
40728  fi
40729
40730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40731  if test "x$test_cygdrive_prefix" = x; then
40732    # As a simple fix, exclude /usr/bin since it's not a real path.
40733    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40735      # a path prefixed by /cygdrive for fixpath to work.
40736      new_path="$CYGWIN_ROOT_PATH$input_path"
40737    fi
40738  fi
40739
40740  # remove trailing .exe if any
40741  new_path="${new_path/%.exe/}"
40742
40743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40744
40745  # First separate the path from the arguments. This will split at the first
40746  # space.
40747  complete="$STRIP"
40748  path="${complete%% *}"
40749  tmp="$complete EOL"
40750  arguments="${tmp#* }"
40751
40752  # Input might be given as Windows format, start by converting to
40753  # unix format.
40754  new_path="$path"
40755
40756  windows_path="$new_path"
40757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40758    unix_path=`$CYGPATH -u "$windows_path"`
40759    new_path="$unix_path"
40760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40762    new_path="$unix_path"
40763  fi
40764
40765
40766  # Now try to locate executable using which
40767  new_path=`$WHICH "$new_path" 2> /dev/null`
40768
40769  if test "x$new_path" = x; then
40770    # Oops. Which didn't find the executable.
40771    # The splitting of arguments from the executable at a space might have been incorrect,
40772    # since paths with space are more likely in Windows. Give it another try with the whole
40773    # argument.
40774    path="$complete"
40775    arguments="EOL"
40776    new_path="$path"
40777
40778  windows_path="$new_path"
40779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40780    unix_path=`$CYGPATH -u "$windows_path"`
40781    new_path="$unix_path"
40782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40784    new_path="$unix_path"
40785  fi
40786
40787
40788    new_path=`$WHICH "$new_path" 2> /dev/null`
40789    # bat and cmd files are not always considered executable in MSYS causing which
40790    # to not find them
40791    if test "x$new_path" = x \
40792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40794      new_path="$path"
40795
40796  windows_path="$new_path"
40797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40798    unix_path=`$CYGPATH -u "$windows_path"`
40799    new_path="$unix_path"
40800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40802    new_path="$unix_path"
40803  fi
40804
40805    fi
40806
40807    if test "x$new_path" = x; then
40808      # It's still not found. Now this is an unrecoverable error.
40809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40810$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40811      has_space=`$ECHO "$complete" | $GREP " "`
40812      if test "x$has_space" != x; then
40813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40815      fi
40816      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40817    fi
40818  fi
40819
40820  # Now new_path has a complete unix path to the binary
40821  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40822    # Keep paths in /bin as-is, but remove trailing .exe if any
40823    new_path="${new_path/%.exe/}"
40824    # Do not save /bin paths to all_fixpath_prefixes!
40825  else
40826    # Not in mixed or Windows style, start by that.
40827    new_path=`cmd //c echo $new_path`
40828
40829  input_path="$new_path"
40830  # Check if we need to convert this using DOS-style short mode. If the path
40831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40832  # take no chances and rewrite it.
40833  # Note: m4 eats our [], so we need to use [ and ] instead.
40834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40835  if test "x$has_forbidden_chars" != x; then
40836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40838  fi
40839
40840    # Output is in $new_path
40841
40842  windows_path="$new_path"
40843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40844    unix_path=`$CYGPATH -u "$windows_path"`
40845    new_path="$unix_path"
40846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40848    new_path="$unix_path"
40849  fi
40850
40851    # remove trailing .exe if any
40852    new_path="${new_path/%.exe/}"
40853
40854    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40855    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40856  fi
40857
40858    else
40859      # We're on a unix platform. Hooray! :)
40860      # First separate the path from the arguments. This will split at the first
40861      # space.
40862      complete="$STRIP"
40863      path="${complete%% *}"
40864      tmp="$complete EOL"
40865      arguments="${tmp#* }"
40866
40867      # Cannot rely on the command "which" here since it doesn't always work.
40868      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40869      if test -z "$is_absolute_path"; then
40870        # Path to executable is not absolute. Find it.
40871        IFS_save="$IFS"
40872        IFS=:
40873        for p in $PATH; do
40874          if test -f "$p/$path" && test -x "$p/$path"; then
40875            new_path="$p/$path"
40876            break
40877          fi
40878        done
40879        IFS="$IFS_save"
40880      else
40881        # This is an absolute path, we can use it without further modifications.
40882        new_path="$path"
40883      fi
40884
40885      if test "x$new_path" = x; then
40886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40887$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40888        has_space=`$ECHO "$complete" | $GREP " "`
40889        if test "x$has_space" != x; then
40890          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40891$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40892        fi
40893        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40894      fi
40895    fi
40896
40897    # Now join together the path and the arguments once again
40898    if test "x$arguments" != xEOL; then
40899      new_complete="$new_path ${arguments% *}"
40900    else
40901      new_complete="$new_path"
40902    fi
40903
40904    if test "x$complete" != "x$new_complete"; then
40905      STRIP="$new_complete"
40906      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40907$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40908    fi
40909  fi
40910
40911    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40912
40913
40914  # Publish this variable in the help.
40915
40916
40917  if [ -z "${NM+x}" ]; then
40918    # The variable is not set by user, try to locate tool using the code snippet
40919    if test -n "$ac_tool_prefix"; then
40920  for ac_prog in nm gcc-nm
40921  do
40922    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40923set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40925$as_echo_n "checking for $ac_word... " >&6; }
40926if ${ac_cv_prog_NM+:} false; then :
40927  $as_echo_n "(cached) " >&6
40928else
40929  if test -n "$NM"; then
40930  ac_cv_prog_NM="$NM" # Let the user override the test.
40931else
40932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40933for as_dir in $PATH
40934do
40935  IFS=$as_save_IFS
40936  test -z "$as_dir" && as_dir=.
40937    for ac_exec_ext in '' $ac_executable_extensions; do
40938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40939    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40941    break 2
40942  fi
40943done
40944  done
40945IFS=$as_save_IFS
40946
40947fi
40948fi
40949NM=$ac_cv_prog_NM
40950if test -n "$NM"; then
40951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40952$as_echo "$NM" >&6; }
40953else
40954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40955$as_echo "no" >&6; }
40956fi
40957
40958
40959    test -n "$NM" && break
40960  done
40961fi
40962if test -z "$NM"; then
40963  ac_ct_NM=$NM
40964  for ac_prog in nm gcc-nm
40965do
40966  # Extract the first word of "$ac_prog", so it can be a program name with args.
40967set dummy $ac_prog; ac_word=$2
40968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40969$as_echo_n "checking for $ac_word... " >&6; }
40970if ${ac_cv_prog_ac_ct_NM+:} false; then :
40971  $as_echo_n "(cached) " >&6
40972else
40973  if test -n "$ac_ct_NM"; then
40974  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40975else
40976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40977for as_dir in $PATH
40978do
40979  IFS=$as_save_IFS
40980  test -z "$as_dir" && as_dir=.
40981    for ac_exec_ext in '' $ac_executable_extensions; do
40982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40983    ac_cv_prog_ac_ct_NM="$ac_prog"
40984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40985    break 2
40986  fi
40987done
40988  done
40989IFS=$as_save_IFS
40990
40991fi
40992fi
40993ac_ct_NM=$ac_cv_prog_ac_ct_NM
40994if test -n "$ac_ct_NM"; then
40995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40996$as_echo "$ac_ct_NM" >&6; }
40997else
40998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40999$as_echo "no" >&6; }
41000fi
41001
41002
41003  test -n "$ac_ct_NM" && break
41004done
41005
41006  if test "x$ac_ct_NM" = x; then
41007    NM=""
41008  else
41009    case $cross_compiling:$ac_tool_warned in
41010yes:)
41011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41013ac_tool_warned=yes ;;
41014esac
41015    NM=$ac_ct_NM
41016  fi
41017fi
41018
41019  else
41020    # The variable is set, but is it from the command line or the environment?
41021
41022    # Try to remove the string !NM! from our list.
41023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41025      # If it failed, the variable was not from the command line. Ignore it,
41026      # but warn the user (except for BASH, which is always set by the calling BASH).
41027      if test "xNM" != xBASH; then
41028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41029$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41030      fi
41031      # Try to locate tool using the code snippet
41032      if test -n "$ac_tool_prefix"; then
41033  for ac_prog in nm gcc-nm
41034  do
41035    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41036set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41038$as_echo_n "checking for $ac_word... " >&6; }
41039if ${ac_cv_prog_NM+:} false; then :
41040  $as_echo_n "(cached) " >&6
41041else
41042  if test -n "$NM"; then
41043  ac_cv_prog_NM="$NM" # Let the user override the test.
41044else
41045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41046for as_dir in $PATH
41047do
41048  IFS=$as_save_IFS
41049  test -z "$as_dir" && as_dir=.
41050    for ac_exec_ext in '' $ac_executable_extensions; do
41051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41052    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41054    break 2
41055  fi
41056done
41057  done
41058IFS=$as_save_IFS
41059
41060fi
41061fi
41062NM=$ac_cv_prog_NM
41063if test -n "$NM"; then
41064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41065$as_echo "$NM" >&6; }
41066else
41067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41068$as_echo "no" >&6; }
41069fi
41070
41071
41072    test -n "$NM" && break
41073  done
41074fi
41075if test -z "$NM"; then
41076  ac_ct_NM=$NM
41077  for ac_prog in nm gcc-nm
41078do
41079  # Extract the first word of "$ac_prog", so it can be a program name with args.
41080set dummy $ac_prog; ac_word=$2
41081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41082$as_echo_n "checking for $ac_word... " >&6; }
41083if ${ac_cv_prog_ac_ct_NM+:} false; then :
41084  $as_echo_n "(cached) " >&6
41085else
41086  if test -n "$ac_ct_NM"; then
41087  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41088else
41089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41090for as_dir in $PATH
41091do
41092  IFS=$as_save_IFS
41093  test -z "$as_dir" && as_dir=.
41094    for ac_exec_ext in '' $ac_executable_extensions; do
41095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41096    ac_cv_prog_ac_ct_NM="$ac_prog"
41097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41098    break 2
41099  fi
41100done
41101  done
41102IFS=$as_save_IFS
41103
41104fi
41105fi
41106ac_ct_NM=$ac_cv_prog_ac_ct_NM
41107if test -n "$ac_ct_NM"; then
41108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41109$as_echo "$ac_ct_NM" >&6; }
41110else
41111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41112$as_echo "no" >&6; }
41113fi
41114
41115
41116  test -n "$ac_ct_NM" && break
41117done
41118
41119  if test "x$ac_ct_NM" = x; then
41120    NM=""
41121  else
41122    case $cross_compiling:$ac_tool_warned in
41123yes:)
41124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41126ac_tool_warned=yes ;;
41127esac
41128    NM=$ac_ct_NM
41129  fi
41130fi
41131
41132    else
41133      # If it succeeded, then it was overridden by the user. We will use it
41134      # for the tool.
41135
41136      # First remove it from the list of overridden variables, so we can test
41137      # for unknown variables in the end.
41138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41139
41140      # Check if we try to supply an empty value
41141      if test "x$NM" = x; then
41142        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41143$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41145$as_echo_n "checking for NM... " >&6; }
41146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41147$as_echo "disabled" >&6; }
41148      else
41149        # Check if the provided tool contains a complete path.
41150        tool_specified="$NM"
41151        tool_basename="${tool_specified##*/}"
41152        if test "x$tool_basename" = "x$tool_specified"; then
41153          # A command without a complete path is provided, search $PATH.
41154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41155$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41156          # Extract the first word of "$tool_basename", so it can be a program name with args.
41157set dummy $tool_basename; ac_word=$2
41158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41159$as_echo_n "checking for $ac_word... " >&6; }
41160if ${ac_cv_path_NM+:} false; then :
41161  $as_echo_n "(cached) " >&6
41162else
41163  case $NM in
41164  [\\/]* | ?:[\\/]*)
41165  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41166  ;;
41167  *)
41168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41169for as_dir in $PATH
41170do
41171  IFS=$as_save_IFS
41172  test -z "$as_dir" && as_dir=.
41173    for ac_exec_ext in '' $ac_executable_extensions; do
41174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41175    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41177    break 2
41178  fi
41179done
41180  done
41181IFS=$as_save_IFS
41182
41183  ;;
41184esac
41185fi
41186NM=$ac_cv_path_NM
41187if test -n "$NM"; then
41188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41189$as_echo "$NM" >&6; }
41190else
41191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41192$as_echo "no" >&6; }
41193fi
41194
41195
41196          if test "x$NM" = x; then
41197            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41198          fi
41199        else
41200          # Otherwise we believe it is a complete path. Use it as it is.
41201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41202$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41203          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41204$as_echo_n "checking for NM... " >&6; }
41205          if test ! -x "$tool_specified"; then
41206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41207$as_echo "not found" >&6; }
41208            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41209          fi
41210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41211$as_echo "$tool_specified" >&6; }
41212        fi
41213      fi
41214    fi
41215
41216  fi
41217
41218
41219    else
41220
41221
41222  # Publish this variable in the help.
41223
41224
41225  if [ -z "${NM+x}" ]; then
41226    # The variable is not set by user, try to locate tool using the code snippet
41227    if test -n "$ac_tool_prefix"; then
41228  for ac_prog in nm
41229  do
41230    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41231set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41233$as_echo_n "checking for $ac_word... " >&6; }
41234if ${ac_cv_prog_NM+:} false; then :
41235  $as_echo_n "(cached) " >&6
41236else
41237  if test -n "$NM"; then
41238  ac_cv_prog_NM="$NM" # Let the user override the test.
41239else
41240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41241for as_dir in $PATH
41242do
41243  IFS=$as_save_IFS
41244  test -z "$as_dir" && as_dir=.
41245    for ac_exec_ext in '' $ac_executable_extensions; do
41246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41247    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41249    break 2
41250  fi
41251done
41252  done
41253IFS=$as_save_IFS
41254
41255fi
41256fi
41257NM=$ac_cv_prog_NM
41258if test -n "$NM"; then
41259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41260$as_echo "$NM" >&6; }
41261else
41262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41263$as_echo "no" >&6; }
41264fi
41265
41266
41267    test -n "$NM" && break
41268  done
41269fi
41270if test -z "$NM"; then
41271  ac_ct_NM=$NM
41272  for ac_prog in nm
41273do
41274  # Extract the first word of "$ac_prog", so it can be a program name with args.
41275set dummy $ac_prog; ac_word=$2
41276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41277$as_echo_n "checking for $ac_word... " >&6; }
41278if ${ac_cv_prog_ac_ct_NM+:} false; then :
41279  $as_echo_n "(cached) " >&6
41280else
41281  if test -n "$ac_ct_NM"; then
41282  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41283else
41284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41285for as_dir in $PATH
41286do
41287  IFS=$as_save_IFS
41288  test -z "$as_dir" && as_dir=.
41289    for ac_exec_ext in '' $ac_executable_extensions; do
41290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41291    ac_cv_prog_ac_ct_NM="$ac_prog"
41292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41293    break 2
41294  fi
41295done
41296  done
41297IFS=$as_save_IFS
41298
41299fi
41300fi
41301ac_ct_NM=$ac_cv_prog_ac_ct_NM
41302if test -n "$ac_ct_NM"; then
41303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41304$as_echo "$ac_ct_NM" >&6; }
41305else
41306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41307$as_echo "no" >&6; }
41308fi
41309
41310
41311  test -n "$ac_ct_NM" && break
41312done
41313
41314  if test "x$ac_ct_NM" = x; then
41315    NM=""
41316  else
41317    case $cross_compiling:$ac_tool_warned in
41318yes:)
41319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41321ac_tool_warned=yes ;;
41322esac
41323    NM=$ac_ct_NM
41324  fi
41325fi
41326
41327  else
41328    # The variable is set, but is it from the command line or the environment?
41329
41330    # Try to remove the string !NM! from our list.
41331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41333      # If it failed, the variable was not from the command line. Ignore it,
41334      # but warn the user (except for BASH, which is always set by the calling BASH).
41335      if test "xNM" != xBASH; then
41336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41337$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41338      fi
41339      # Try to locate tool using the code snippet
41340      if test -n "$ac_tool_prefix"; then
41341  for ac_prog in nm
41342  do
41343    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41344set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41346$as_echo_n "checking for $ac_word... " >&6; }
41347if ${ac_cv_prog_NM+:} false; then :
41348  $as_echo_n "(cached) " >&6
41349else
41350  if test -n "$NM"; then
41351  ac_cv_prog_NM="$NM" # Let the user override the test.
41352else
41353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41354for as_dir in $PATH
41355do
41356  IFS=$as_save_IFS
41357  test -z "$as_dir" && as_dir=.
41358    for ac_exec_ext in '' $ac_executable_extensions; do
41359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41360    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41362    break 2
41363  fi
41364done
41365  done
41366IFS=$as_save_IFS
41367
41368fi
41369fi
41370NM=$ac_cv_prog_NM
41371if test -n "$NM"; then
41372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41373$as_echo "$NM" >&6; }
41374else
41375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41376$as_echo "no" >&6; }
41377fi
41378
41379
41380    test -n "$NM" && break
41381  done
41382fi
41383if test -z "$NM"; then
41384  ac_ct_NM=$NM
41385  for ac_prog in nm
41386do
41387  # Extract the first word of "$ac_prog", so it can be a program name with args.
41388set dummy $ac_prog; ac_word=$2
41389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41390$as_echo_n "checking for $ac_word... " >&6; }
41391if ${ac_cv_prog_ac_ct_NM+:} false; then :
41392  $as_echo_n "(cached) " >&6
41393else
41394  if test -n "$ac_ct_NM"; then
41395  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41396else
41397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41398for as_dir in $PATH
41399do
41400  IFS=$as_save_IFS
41401  test -z "$as_dir" && as_dir=.
41402    for ac_exec_ext in '' $ac_executable_extensions; do
41403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41404    ac_cv_prog_ac_ct_NM="$ac_prog"
41405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41406    break 2
41407  fi
41408done
41409  done
41410IFS=$as_save_IFS
41411
41412fi
41413fi
41414ac_ct_NM=$ac_cv_prog_ac_ct_NM
41415if test -n "$ac_ct_NM"; then
41416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41417$as_echo "$ac_ct_NM" >&6; }
41418else
41419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41420$as_echo "no" >&6; }
41421fi
41422
41423
41424  test -n "$ac_ct_NM" && break
41425done
41426
41427  if test "x$ac_ct_NM" = x; then
41428    NM=""
41429  else
41430    case $cross_compiling:$ac_tool_warned in
41431yes:)
41432{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41433$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41434ac_tool_warned=yes ;;
41435esac
41436    NM=$ac_ct_NM
41437  fi
41438fi
41439
41440    else
41441      # If it succeeded, then it was overridden by the user. We will use it
41442      # for the tool.
41443
41444      # First remove it from the list of overridden variables, so we can test
41445      # for unknown variables in the end.
41446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41447
41448      # Check if we try to supply an empty value
41449      if test "x$NM" = x; then
41450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41451$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41453$as_echo_n "checking for NM... " >&6; }
41454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41455$as_echo "disabled" >&6; }
41456      else
41457        # Check if the provided tool contains a complete path.
41458        tool_specified="$NM"
41459        tool_basename="${tool_specified##*/}"
41460        if test "x$tool_basename" = "x$tool_specified"; then
41461          # A command without a complete path is provided, search $PATH.
41462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41463$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41464          # Extract the first word of "$tool_basename", so it can be a program name with args.
41465set dummy $tool_basename; ac_word=$2
41466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41467$as_echo_n "checking for $ac_word... " >&6; }
41468if ${ac_cv_path_NM+:} false; then :
41469  $as_echo_n "(cached) " >&6
41470else
41471  case $NM in
41472  [\\/]* | ?:[\\/]*)
41473  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41474  ;;
41475  *)
41476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41477for as_dir in $PATH
41478do
41479  IFS=$as_save_IFS
41480  test -z "$as_dir" && as_dir=.
41481    for ac_exec_ext in '' $ac_executable_extensions; do
41482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41483    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41485    break 2
41486  fi
41487done
41488  done
41489IFS=$as_save_IFS
41490
41491  ;;
41492esac
41493fi
41494NM=$ac_cv_path_NM
41495if test -n "$NM"; then
41496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41497$as_echo "$NM" >&6; }
41498else
41499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41500$as_echo "no" >&6; }
41501fi
41502
41503
41504          if test "x$NM" = x; then
41505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41506          fi
41507        else
41508          # Otherwise we believe it is a complete path. Use it as it is.
41509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41510$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41512$as_echo_n "checking for NM... " >&6; }
41513          if test ! -x "$tool_specified"; then
41514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41515$as_echo "not found" >&6; }
41516            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41517          fi
41518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41519$as_echo "$tool_specified" >&6; }
41520        fi
41521      fi
41522    fi
41523
41524  fi
41525
41526
41527    fi
41528
41529  # Only process if variable expands to non-empty
41530
41531  if test "x$NM" != x; then
41532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41533
41534  # First separate the path from the arguments. This will split at the first
41535  # space.
41536  complete="$NM"
41537  path="${complete%% *}"
41538  tmp="$complete EOL"
41539  arguments="${tmp#* }"
41540
41541  # Input might be given as Windows format, start by converting to
41542  # unix format.
41543  new_path=`$CYGPATH -u "$path"`
41544
41545  # Now try to locate executable using which
41546  new_path=`$WHICH "$new_path" 2> /dev/null`
41547  # bat and cmd files are not always considered executable in cygwin causing which
41548  # to not find them
41549  if test "x$new_path" = x \
41550      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41551      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41552    new_path=`$CYGPATH -u "$path"`
41553  fi
41554  if test "x$new_path" = x; then
41555    # Oops. Which didn't find the executable.
41556    # The splitting of arguments from the executable at a space might have been incorrect,
41557    # since paths with space are more likely in Windows. Give it another try with the whole
41558    # argument.
41559    path="$complete"
41560    arguments="EOL"
41561    new_path=`$CYGPATH -u "$path"`
41562    new_path=`$WHICH "$new_path" 2> /dev/null`
41563    # bat and cmd files are not always considered executable in cygwin causing which
41564    # to not find them
41565    if test "x$new_path" = x \
41566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41568      new_path=`$CYGPATH -u "$path"`
41569    fi
41570    if test "x$new_path" = x; then
41571      # It's still not found. Now this is an unrecoverable error.
41572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41573$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41574      has_space=`$ECHO "$complete" | $GREP " "`
41575      if test "x$has_space" != x; then
41576        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41577$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41578      fi
41579      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41580    fi
41581  fi
41582
41583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41586  # "foo.exe" is OK but "foo" is an error.
41587  #
41588  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41589  # It is also a way to make sure we got the proper file name for the real test later on.
41590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41591  if test "x$test_shortpath" = x; then
41592    # Short path failed, file does not exist as specified.
41593    # Try adding .exe or .cmd
41594    if test -f "${new_path}.exe"; then
41595      input_to_shortpath="${new_path}.exe"
41596    elif test -f "${new_path}.cmd"; then
41597      input_to_shortpath="${new_path}.cmd"
41598    else
41599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41600$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41601      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41602$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41603      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41604    fi
41605  else
41606    input_to_shortpath="$new_path"
41607  fi
41608
41609  # Call helper function which possibly converts this using DOS-style short mode.
41610  # If so, the updated path is stored in $new_path.
41611  new_path="$input_to_shortpath"
41612
41613  input_path="$input_to_shortpath"
41614  # Check if we need to convert this using DOS-style short mode. If the path
41615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41616  # take no chances and rewrite it.
41617  # Note: m4 eats our [], so we need to use [ and ] instead.
41618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41619  if test "x$has_forbidden_chars" != x; then
41620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41624      # Going to short mode and back again did indeed matter. Since short mode is
41625      # case insensitive, let's make it lowercase to improve readability.
41626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41627      # Now convert it back to Unix-style (cygpath)
41628      input_path=`$CYGPATH -u "$shortmode_path"`
41629      new_path="$input_path"
41630    fi
41631  fi
41632
41633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41634  if test "x$test_cygdrive_prefix" = x; then
41635    # As a simple fix, exclude /usr/bin since it's not a real path.
41636    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41638      # a path prefixed by /cygdrive for fixpath to work.
41639      new_path="$CYGWIN_ROOT_PATH$input_path"
41640    fi
41641  fi
41642
41643  # remove trailing .exe if any
41644  new_path="${new_path/%.exe/}"
41645
41646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41647
41648  # First separate the path from the arguments. This will split at the first
41649  # space.
41650  complete="$NM"
41651  path="${complete%% *}"
41652  tmp="$complete EOL"
41653  arguments="${tmp#* }"
41654
41655  # Input might be given as Windows format, start by converting to
41656  # unix format.
41657  new_path="$path"
41658
41659  windows_path="$new_path"
41660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41661    unix_path=`$CYGPATH -u "$windows_path"`
41662    new_path="$unix_path"
41663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41665    new_path="$unix_path"
41666  fi
41667
41668
41669  # Now try to locate executable using which
41670  new_path=`$WHICH "$new_path" 2> /dev/null`
41671
41672  if test "x$new_path" = x; then
41673    # Oops. Which didn't find the executable.
41674    # The splitting of arguments from the executable at a space might have been incorrect,
41675    # since paths with space are more likely in Windows. Give it another try with the whole
41676    # argument.
41677    path="$complete"
41678    arguments="EOL"
41679    new_path="$path"
41680
41681  windows_path="$new_path"
41682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41683    unix_path=`$CYGPATH -u "$windows_path"`
41684    new_path="$unix_path"
41685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41687    new_path="$unix_path"
41688  fi
41689
41690
41691    new_path=`$WHICH "$new_path" 2> /dev/null`
41692    # bat and cmd files are not always considered executable in MSYS causing which
41693    # to not find them
41694    if test "x$new_path" = x \
41695        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41696        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41697      new_path="$path"
41698
41699  windows_path="$new_path"
41700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41701    unix_path=`$CYGPATH -u "$windows_path"`
41702    new_path="$unix_path"
41703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41705    new_path="$unix_path"
41706  fi
41707
41708    fi
41709
41710    if test "x$new_path" = x; then
41711      # It's still not found. Now this is an unrecoverable error.
41712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41713$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41714      has_space=`$ECHO "$complete" | $GREP " "`
41715      if test "x$has_space" != x; then
41716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41718      fi
41719      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41720    fi
41721  fi
41722
41723  # Now new_path has a complete unix path to the binary
41724  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41725    # Keep paths in /bin as-is, but remove trailing .exe if any
41726    new_path="${new_path/%.exe/}"
41727    # Do not save /bin paths to all_fixpath_prefixes!
41728  else
41729    # Not in mixed or Windows style, start by that.
41730    new_path=`cmd //c echo $new_path`
41731
41732  input_path="$new_path"
41733  # Check if we need to convert this using DOS-style short mode. If the path
41734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41735  # take no chances and rewrite it.
41736  # Note: m4 eats our [], so we need to use [ and ] instead.
41737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41738  if test "x$has_forbidden_chars" != x; then
41739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41741  fi
41742
41743    # Output is in $new_path
41744
41745  windows_path="$new_path"
41746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41747    unix_path=`$CYGPATH -u "$windows_path"`
41748    new_path="$unix_path"
41749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41751    new_path="$unix_path"
41752  fi
41753
41754    # remove trailing .exe if any
41755    new_path="${new_path/%.exe/}"
41756
41757    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41758    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41759  fi
41760
41761    else
41762      # We're on a unix platform. Hooray! :)
41763      # First separate the path from the arguments. This will split at the first
41764      # space.
41765      complete="$NM"
41766      path="${complete%% *}"
41767      tmp="$complete EOL"
41768      arguments="${tmp#* }"
41769
41770      # Cannot rely on the command "which" here since it doesn't always work.
41771      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41772      if test -z "$is_absolute_path"; then
41773        # Path to executable is not absolute. Find it.
41774        IFS_save="$IFS"
41775        IFS=:
41776        for p in $PATH; do
41777          if test -f "$p/$path" && test -x "$p/$path"; then
41778            new_path="$p/$path"
41779            break
41780          fi
41781        done
41782        IFS="$IFS_save"
41783      else
41784        # This is an absolute path, we can use it without further modifications.
41785        new_path="$path"
41786      fi
41787
41788      if test "x$new_path" = x; then
41789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41790$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41791        has_space=`$ECHO "$complete" | $GREP " "`
41792        if test "x$has_space" != x; then
41793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41795        fi
41796        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41797      fi
41798    fi
41799
41800    # Now join together the path and the arguments once again
41801    if test "x$arguments" != xEOL; then
41802      new_complete="$new_path ${arguments% *}"
41803    else
41804      new_complete="$new_path"
41805    fi
41806
41807    if test "x$complete" != "x$new_complete"; then
41808      NM="$new_complete"
41809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41810$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41811    fi
41812  fi
41813
41814    GNM="$NM"
41815
41816  fi
41817
41818  # objcopy is used for moving debug symbols to separate files when
41819  # full debug symbols are enabled.
41820  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41821
41822
41823  # Publish this variable in the help.
41824
41825
41826  if [ -z "${OBJCOPY+x}" ]; then
41827    # The variable is not set by user, try to locate tool using the code snippet
41828    if test -n "$ac_tool_prefix"; then
41829  for ac_prog in gobjcopy objcopy
41830  do
41831    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41832set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41834$as_echo_n "checking for $ac_word... " >&6; }
41835if ${ac_cv_prog_OBJCOPY+:} false; then :
41836  $as_echo_n "(cached) " >&6
41837else
41838  if test -n "$OBJCOPY"; then
41839  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41840else
41841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41842for as_dir in $PATH
41843do
41844  IFS=$as_save_IFS
41845  test -z "$as_dir" && as_dir=.
41846    for ac_exec_ext in '' $ac_executable_extensions; do
41847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41848    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41850    break 2
41851  fi
41852done
41853  done
41854IFS=$as_save_IFS
41855
41856fi
41857fi
41858OBJCOPY=$ac_cv_prog_OBJCOPY
41859if test -n "$OBJCOPY"; then
41860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41861$as_echo "$OBJCOPY" >&6; }
41862else
41863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41864$as_echo "no" >&6; }
41865fi
41866
41867
41868    test -n "$OBJCOPY" && break
41869  done
41870fi
41871if test -z "$OBJCOPY"; then
41872  ac_ct_OBJCOPY=$OBJCOPY
41873  for ac_prog in gobjcopy objcopy
41874do
41875  # Extract the first word of "$ac_prog", so it can be a program name with args.
41876set dummy $ac_prog; ac_word=$2
41877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41878$as_echo_n "checking for $ac_word... " >&6; }
41879if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41880  $as_echo_n "(cached) " >&6
41881else
41882  if test -n "$ac_ct_OBJCOPY"; then
41883  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41884else
41885as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41886for as_dir in $PATH
41887do
41888  IFS=$as_save_IFS
41889  test -z "$as_dir" && as_dir=.
41890    for ac_exec_ext in '' $ac_executable_extensions; do
41891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41892    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41894    break 2
41895  fi
41896done
41897  done
41898IFS=$as_save_IFS
41899
41900fi
41901fi
41902ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41903if test -n "$ac_ct_OBJCOPY"; then
41904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41905$as_echo "$ac_ct_OBJCOPY" >&6; }
41906else
41907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41908$as_echo "no" >&6; }
41909fi
41910
41911
41912  test -n "$ac_ct_OBJCOPY" && break
41913done
41914
41915  if test "x$ac_ct_OBJCOPY" = x; then
41916    OBJCOPY=""
41917  else
41918    case $cross_compiling:$ac_tool_warned in
41919yes:)
41920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41922ac_tool_warned=yes ;;
41923esac
41924    OBJCOPY=$ac_ct_OBJCOPY
41925  fi
41926fi
41927
41928  else
41929    # The variable is set, but is it from the command line or the environment?
41930
41931    # Try to remove the string !OBJCOPY! from our list.
41932    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41933    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41934      # If it failed, the variable was not from the command line. Ignore it,
41935      # but warn the user (except for BASH, which is always set by the calling BASH).
41936      if test "xOBJCOPY" != xBASH; then
41937        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41938$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41939      fi
41940      # Try to locate tool using the code snippet
41941      if test -n "$ac_tool_prefix"; then
41942  for ac_prog in gobjcopy objcopy
41943  do
41944    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41945set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41947$as_echo_n "checking for $ac_word... " >&6; }
41948if ${ac_cv_prog_OBJCOPY+:} false; then :
41949  $as_echo_n "(cached) " >&6
41950else
41951  if test -n "$OBJCOPY"; then
41952  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41953else
41954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41955for as_dir in $PATH
41956do
41957  IFS=$as_save_IFS
41958  test -z "$as_dir" && as_dir=.
41959    for ac_exec_ext in '' $ac_executable_extensions; do
41960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41961    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41963    break 2
41964  fi
41965done
41966  done
41967IFS=$as_save_IFS
41968
41969fi
41970fi
41971OBJCOPY=$ac_cv_prog_OBJCOPY
41972if test -n "$OBJCOPY"; then
41973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41974$as_echo "$OBJCOPY" >&6; }
41975else
41976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41977$as_echo "no" >&6; }
41978fi
41979
41980
41981    test -n "$OBJCOPY" && break
41982  done
41983fi
41984if test -z "$OBJCOPY"; then
41985  ac_ct_OBJCOPY=$OBJCOPY
41986  for ac_prog in gobjcopy objcopy
41987do
41988  # Extract the first word of "$ac_prog", so it can be a program name with args.
41989set dummy $ac_prog; ac_word=$2
41990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41991$as_echo_n "checking for $ac_word... " >&6; }
41992if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41993  $as_echo_n "(cached) " >&6
41994else
41995  if test -n "$ac_ct_OBJCOPY"; then
41996  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41997else
41998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41999for as_dir in $PATH
42000do
42001  IFS=$as_save_IFS
42002  test -z "$as_dir" && as_dir=.
42003    for ac_exec_ext in '' $ac_executable_extensions; do
42004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42005    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42007    break 2
42008  fi
42009done
42010  done
42011IFS=$as_save_IFS
42012
42013fi
42014fi
42015ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42016if test -n "$ac_ct_OBJCOPY"; then
42017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42018$as_echo "$ac_ct_OBJCOPY" >&6; }
42019else
42020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42021$as_echo "no" >&6; }
42022fi
42023
42024
42025  test -n "$ac_ct_OBJCOPY" && break
42026done
42027
42028  if test "x$ac_ct_OBJCOPY" = x; then
42029    OBJCOPY=""
42030  else
42031    case $cross_compiling:$ac_tool_warned in
42032yes:)
42033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42035ac_tool_warned=yes ;;
42036esac
42037    OBJCOPY=$ac_ct_OBJCOPY
42038  fi
42039fi
42040
42041    else
42042      # If it succeeded, then it was overridden by the user. We will use it
42043      # for the tool.
42044
42045      # First remove it from the list of overridden variables, so we can test
42046      # for unknown variables in the end.
42047      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42048
42049      # Check if we try to supply an empty value
42050      if test "x$OBJCOPY" = x; then
42051        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42052$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42054$as_echo_n "checking for OBJCOPY... " >&6; }
42055        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42056$as_echo "disabled" >&6; }
42057      else
42058        # Check if the provided tool contains a complete path.
42059        tool_specified="$OBJCOPY"
42060        tool_basename="${tool_specified##*/}"
42061        if test "x$tool_basename" = "x$tool_specified"; then
42062          # A command without a complete path is provided, search $PATH.
42063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42064$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42065          # Extract the first word of "$tool_basename", so it can be a program name with args.
42066set dummy $tool_basename; ac_word=$2
42067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42068$as_echo_n "checking for $ac_word... " >&6; }
42069if ${ac_cv_path_OBJCOPY+:} false; then :
42070  $as_echo_n "(cached) " >&6
42071else
42072  case $OBJCOPY in
42073  [\\/]* | ?:[\\/]*)
42074  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42075  ;;
42076  *)
42077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42078for as_dir in $PATH
42079do
42080  IFS=$as_save_IFS
42081  test -z "$as_dir" && as_dir=.
42082    for ac_exec_ext in '' $ac_executable_extensions; do
42083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42084    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42086    break 2
42087  fi
42088done
42089  done
42090IFS=$as_save_IFS
42091
42092  ;;
42093esac
42094fi
42095OBJCOPY=$ac_cv_path_OBJCOPY
42096if test -n "$OBJCOPY"; then
42097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42098$as_echo "$OBJCOPY" >&6; }
42099else
42100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42101$as_echo "no" >&6; }
42102fi
42103
42104
42105          if test "x$OBJCOPY" = x; then
42106            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42107          fi
42108        else
42109          # Otherwise we believe it is a complete path. Use it as it is.
42110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42111$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42112          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42113$as_echo_n "checking for OBJCOPY... " >&6; }
42114          if test ! -x "$tool_specified"; then
42115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42116$as_echo "not found" >&6; }
42117            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42118          fi
42119          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42120$as_echo "$tool_specified" >&6; }
42121        fi
42122      fi
42123    fi
42124
42125  fi
42126
42127
42128    # Only call fixup if objcopy was found.
42129    if test -n "$OBJCOPY"; then
42130
42131  # Only process if variable expands to non-empty
42132
42133  if test "x$OBJCOPY" != x; then
42134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42135
42136  # First separate the path from the arguments. This will split at the first
42137  # space.
42138  complete="$OBJCOPY"
42139  path="${complete%% *}"
42140  tmp="$complete EOL"
42141  arguments="${tmp#* }"
42142
42143  # Input might be given as Windows format, start by converting to
42144  # unix format.
42145  new_path=`$CYGPATH -u "$path"`
42146
42147  # Now try to locate executable using which
42148  new_path=`$WHICH "$new_path" 2> /dev/null`
42149  # bat and cmd files are not always considered executable in cygwin causing which
42150  # to not find them
42151  if test "x$new_path" = x \
42152      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42153      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42154    new_path=`$CYGPATH -u "$path"`
42155  fi
42156  if test "x$new_path" = x; then
42157    # Oops. Which didn't find the executable.
42158    # The splitting of arguments from the executable at a space might have been incorrect,
42159    # since paths with space are more likely in Windows. Give it another try with the whole
42160    # argument.
42161    path="$complete"
42162    arguments="EOL"
42163    new_path=`$CYGPATH -u "$path"`
42164    new_path=`$WHICH "$new_path" 2> /dev/null`
42165    # bat and cmd files are not always considered executable in cygwin causing which
42166    # to not find them
42167    if test "x$new_path" = x \
42168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42170      new_path=`$CYGPATH -u "$path"`
42171    fi
42172    if test "x$new_path" = x; then
42173      # It's still not found. Now this is an unrecoverable error.
42174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42175$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42176      has_space=`$ECHO "$complete" | $GREP " "`
42177      if test "x$has_space" != x; then
42178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42180      fi
42181      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42182    fi
42183  fi
42184
42185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42188  # "foo.exe" is OK but "foo" is an error.
42189  #
42190  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42191  # It is also a way to make sure we got the proper file name for the real test later on.
42192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42193  if test "x$test_shortpath" = x; then
42194    # Short path failed, file does not exist as specified.
42195    # Try adding .exe or .cmd
42196    if test -f "${new_path}.exe"; then
42197      input_to_shortpath="${new_path}.exe"
42198    elif test -f "${new_path}.cmd"; then
42199      input_to_shortpath="${new_path}.cmd"
42200    else
42201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42202$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42203      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42204$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42205      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42206    fi
42207  else
42208    input_to_shortpath="$new_path"
42209  fi
42210
42211  # Call helper function which possibly converts this using DOS-style short mode.
42212  # If so, the updated path is stored in $new_path.
42213  new_path="$input_to_shortpath"
42214
42215  input_path="$input_to_shortpath"
42216  # Check if we need to convert this using DOS-style short mode. If the path
42217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42218  # take no chances and rewrite it.
42219  # Note: m4 eats our [], so we need to use [ and ] instead.
42220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42221  if test "x$has_forbidden_chars" != x; then
42222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42223    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42224    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42225    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42226      # Going to short mode and back again did indeed matter. Since short mode is
42227      # case insensitive, let's make it lowercase to improve readability.
42228      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42229      # Now convert it back to Unix-style (cygpath)
42230      input_path=`$CYGPATH -u "$shortmode_path"`
42231      new_path="$input_path"
42232    fi
42233  fi
42234
42235  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42236  if test "x$test_cygdrive_prefix" = x; then
42237    # As a simple fix, exclude /usr/bin since it's not a real path.
42238    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42239      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42240      # a path prefixed by /cygdrive for fixpath to work.
42241      new_path="$CYGWIN_ROOT_PATH$input_path"
42242    fi
42243  fi
42244
42245  # remove trailing .exe if any
42246  new_path="${new_path/%.exe/}"
42247
42248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42249
42250  # First separate the path from the arguments. This will split at the first
42251  # space.
42252  complete="$OBJCOPY"
42253  path="${complete%% *}"
42254  tmp="$complete EOL"
42255  arguments="${tmp#* }"
42256
42257  # Input might be given as Windows format, start by converting to
42258  # unix format.
42259  new_path="$path"
42260
42261  windows_path="$new_path"
42262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42263    unix_path=`$CYGPATH -u "$windows_path"`
42264    new_path="$unix_path"
42265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42267    new_path="$unix_path"
42268  fi
42269
42270
42271  # Now try to locate executable using which
42272  new_path=`$WHICH "$new_path" 2> /dev/null`
42273
42274  if test "x$new_path" = x; then
42275    # Oops. Which didn't find the executable.
42276    # The splitting of arguments from the executable at a space might have been incorrect,
42277    # since paths with space are more likely in Windows. Give it another try with the whole
42278    # argument.
42279    path="$complete"
42280    arguments="EOL"
42281    new_path="$path"
42282
42283  windows_path="$new_path"
42284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42285    unix_path=`$CYGPATH -u "$windows_path"`
42286    new_path="$unix_path"
42287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42289    new_path="$unix_path"
42290  fi
42291
42292
42293    new_path=`$WHICH "$new_path" 2> /dev/null`
42294    # bat and cmd files are not always considered executable in MSYS causing which
42295    # to not find them
42296    if test "x$new_path" = x \
42297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42299      new_path="$path"
42300
42301  windows_path="$new_path"
42302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42303    unix_path=`$CYGPATH -u "$windows_path"`
42304    new_path="$unix_path"
42305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42307    new_path="$unix_path"
42308  fi
42309
42310    fi
42311
42312    if test "x$new_path" = x; then
42313      # It's still not found. Now this is an unrecoverable error.
42314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42315$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42316      has_space=`$ECHO "$complete" | $GREP " "`
42317      if test "x$has_space" != x; then
42318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42320      fi
42321      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42322    fi
42323  fi
42324
42325  # Now new_path has a complete unix path to the binary
42326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42327    # Keep paths in /bin as-is, but remove trailing .exe if any
42328    new_path="${new_path/%.exe/}"
42329    # Do not save /bin paths to all_fixpath_prefixes!
42330  else
42331    # Not in mixed or Windows style, start by that.
42332    new_path=`cmd //c echo $new_path`
42333
42334  input_path="$new_path"
42335  # Check if we need to convert this using DOS-style short mode. If the path
42336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42337  # take no chances and rewrite it.
42338  # Note: m4 eats our [], so we need to use [ and ] instead.
42339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42340  if test "x$has_forbidden_chars" != x; then
42341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42343  fi
42344
42345    # Output is in $new_path
42346
42347  windows_path="$new_path"
42348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42349    unix_path=`$CYGPATH -u "$windows_path"`
42350    new_path="$unix_path"
42351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42353    new_path="$unix_path"
42354  fi
42355
42356    # remove trailing .exe if any
42357    new_path="${new_path/%.exe/}"
42358
42359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42361  fi
42362
42363    else
42364      # We're on a unix platform. Hooray! :)
42365      # First separate the path from the arguments. This will split at the first
42366      # space.
42367      complete="$OBJCOPY"
42368      path="${complete%% *}"
42369      tmp="$complete EOL"
42370      arguments="${tmp#* }"
42371
42372      # Cannot rely on the command "which" here since it doesn't always work.
42373      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42374      if test -z "$is_absolute_path"; then
42375        # Path to executable is not absolute. Find it.
42376        IFS_save="$IFS"
42377        IFS=:
42378        for p in $PATH; do
42379          if test -f "$p/$path" && test -x "$p/$path"; then
42380            new_path="$p/$path"
42381            break
42382          fi
42383        done
42384        IFS="$IFS_save"
42385      else
42386        # This is an absolute path, we can use it without further modifications.
42387        new_path="$path"
42388      fi
42389
42390      if test "x$new_path" = x; then
42391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42392$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42393        has_space=`$ECHO "$complete" | $GREP " "`
42394        if test "x$has_space" != x; then
42395          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42396$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42397        fi
42398        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42399      fi
42400    fi
42401
42402    # Now join together the path and the arguments once again
42403    if test "x$arguments" != xEOL; then
42404      new_complete="$new_path ${arguments% *}"
42405    else
42406      new_complete="$new_path"
42407    fi
42408
42409    if test "x$complete" != "x$new_complete"; then
42410      OBJCOPY="$new_complete"
42411      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42412$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42413    fi
42414  fi
42415
42416      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42417        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42418        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42419        # - version number is last blank separate word on first line
42420        # - version number formats that have been seen:
42421        #   - <major>.<minor>
42422        #   - <major>.<minor>.<micro>
42423        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42424        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42425         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42426              -e 's/.* //' \
42427              -e '/^[01]\./b bad' \
42428              -e '/^2\./{' \
42429              -e '  s/^2\.//' \
42430              -e '  /^[0-9]$/b bad' \
42431              -e '  /^[0-9]\./b bad' \
42432              -e '  /^1[0-9]$/b bad' \
42433              -e '  /^1[0-9]\./b bad' \
42434              -e '  /^20\./b bad' \
42435              -e '  /^21\.0$/b bad' \
42436              -e '  /^21\.0\./b bad' \
42437              -e '}' \
42438              -e ':good' \
42439              -e 's/.*/VALID_VERSION/p' \
42440              -e 'q' \
42441              -e ':bad' \
42442              -e 's/.*/BAD_VERSION/p' \
42443              -e 'q'`
42444        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42445          OBJCOPY=
42446          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
42447$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42448          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42449$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42450          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42451$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42452          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42453$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42454          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42455$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42456        fi
42457      fi
42458    fi
42459  fi
42460
42461
42462
42463  # Publish this variable in the help.
42464
42465
42466  if [ -z "${OBJDUMP+x}" ]; then
42467    # The variable is not set by user, try to locate tool using the code snippet
42468    if test -n "$ac_tool_prefix"; then
42469  for ac_prog in gobjdump objdump
42470  do
42471    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42472set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42474$as_echo_n "checking for $ac_word... " >&6; }
42475if ${ac_cv_prog_OBJDUMP+:} false; then :
42476  $as_echo_n "(cached) " >&6
42477else
42478  if test -n "$OBJDUMP"; then
42479  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42480else
42481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42482for as_dir in $PATH
42483do
42484  IFS=$as_save_IFS
42485  test -z "$as_dir" && as_dir=.
42486    for ac_exec_ext in '' $ac_executable_extensions; do
42487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42488    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42490    break 2
42491  fi
42492done
42493  done
42494IFS=$as_save_IFS
42495
42496fi
42497fi
42498OBJDUMP=$ac_cv_prog_OBJDUMP
42499if test -n "$OBJDUMP"; then
42500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42501$as_echo "$OBJDUMP" >&6; }
42502else
42503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42504$as_echo "no" >&6; }
42505fi
42506
42507
42508    test -n "$OBJDUMP" && break
42509  done
42510fi
42511if test -z "$OBJDUMP"; then
42512  ac_ct_OBJDUMP=$OBJDUMP
42513  for ac_prog in gobjdump objdump
42514do
42515  # Extract the first word of "$ac_prog", so it can be a program name with args.
42516set dummy $ac_prog; ac_word=$2
42517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42518$as_echo_n "checking for $ac_word... " >&6; }
42519if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42520  $as_echo_n "(cached) " >&6
42521else
42522  if test -n "$ac_ct_OBJDUMP"; then
42523  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42524else
42525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42526for as_dir in $PATH
42527do
42528  IFS=$as_save_IFS
42529  test -z "$as_dir" && as_dir=.
42530    for ac_exec_ext in '' $ac_executable_extensions; do
42531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42532    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42534    break 2
42535  fi
42536done
42537  done
42538IFS=$as_save_IFS
42539
42540fi
42541fi
42542ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42543if test -n "$ac_ct_OBJDUMP"; then
42544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42545$as_echo "$ac_ct_OBJDUMP" >&6; }
42546else
42547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42548$as_echo "no" >&6; }
42549fi
42550
42551
42552  test -n "$ac_ct_OBJDUMP" && break
42553done
42554
42555  if test "x$ac_ct_OBJDUMP" = x; then
42556    OBJDUMP=""
42557  else
42558    case $cross_compiling:$ac_tool_warned in
42559yes:)
42560{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42561$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42562ac_tool_warned=yes ;;
42563esac
42564    OBJDUMP=$ac_ct_OBJDUMP
42565  fi
42566fi
42567
42568  else
42569    # The variable is set, but is it from the command line or the environment?
42570
42571    # Try to remove the string !OBJDUMP! from our list.
42572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42574      # If it failed, the variable was not from the command line. Ignore it,
42575      # but warn the user (except for BASH, which is always set by the calling BASH).
42576      if test "xOBJDUMP" != xBASH; then
42577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42578$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42579      fi
42580      # Try to locate tool using the code snippet
42581      if test -n "$ac_tool_prefix"; then
42582  for ac_prog in gobjdump objdump
42583  do
42584    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42587$as_echo_n "checking for $ac_word... " >&6; }
42588if ${ac_cv_prog_OBJDUMP+:} false; then :
42589  $as_echo_n "(cached) " >&6
42590else
42591  if test -n "$OBJDUMP"; then
42592  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42593else
42594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42595for as_dir in $PATH
42596do
42597  IFS=$as_save_IFS
42598  test -z "$as_dir" && as_dir=.
42599    for ac_exec_ext in '' $ac_executable_extensions; do
42600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42601    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42603    break 2
42604  fi
42605done
42606  done
42607IFS=$as_save_IFS
42608
42609fi
42610fi
42611OBJDUMP=$ac_cv_prog_OBJDUMP
42612if test -n "$OBJDUMP"; then
42613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42614$as_echo "$OBJDUMP" >&6; }
42615else
42616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42617$as_echo "no" >&6; }
42618fi
42619
42620
42621    test -n "$OBJDUMP" && break
42622  done
42623fi
42624if test -z "$OBJDUMP"; then
42625  ac_ct_OBJDUMP=$OBJDUMP
42626  for ac_prog in gobjdump objdump
42627do
42628  # Extract the first word of "$ac_prog", so it can be a program name with args.
42629set dummy $ac_prog; ac_word=$2
42630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42631$as_echo_n "checking for $ac_word... " >&6; }
42632if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42633  $as_echo_n "(cached) " >&6
42634else
42635  if test -n "$ac_ct_OBJDUMP"; then
42636  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42637else
42638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42639for as_dir in $PATH
42640do
42641  IFS=$as_save_IFS
42642  test -z "$as_dir" && as_dir=.
42643    for ac_exec_ext in '' $ac_executable_extensions; do
42644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42645    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42647    break 2
42648  fi
42649done
42650  done
42651IFS=$as_save_IFS
42652
42653fi
42654fi
42655ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42656if test -n "$ac_ct_OBJDUMP"; then
42657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42658$as_echo "$ac_ct_OBJDUMP" >&6; }
42659else
42660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42661$as_echo "no" >&6; }
42662fi
42663
42664
42665  test -n "$ac_ct_OBJDUMP" && break
42666done
42667
42668  if test "x$ac_ct_OBJDUMP" = x; then
42669    OBJDUMP=""
42670  else
42671    case $cross_compiling:$ac_tool_warned in
42672yes:)
42673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42675ac_tool_warned=yes ;;
42676esac
42677    OBJDUMP=$ac_ct_OBJDUMP
42678  fi
42679fi
42680
42681    else
42682      # If it succeeded, then it was overridden by the user. We will use it
42683      # for the tool.
42684
42685      # First remove it from the list of overridden variables, so we can test
42686      # for unknown variables in the end.
42687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42688
42689      # Check if we try to supply an empty value
42690      if test "x$OBJDUMP" = x; then
42691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42692$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42694$as_echo_n "checking for OBJDUMP... " >&6; }
42695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42696$as_echo "disabled" >&6; }
42697      else
42698        # Check if the provided tool contains a complete path.
42699        tool_specified="$OBJDUMP"
42700        tool_basename="${tool_specified##*/}"
42701        if test "x$tool_basename" = "x$tool_specified"; then
42702          # A command without a complete path is provided, search $PATH.
42703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42704$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42705          # Extract the first word of "$tool_basename", so it can be a program name with args.
42706set dummy $tool_basename; ac_word=$2
42707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42708$as_echo_n "checking for $ac_word... " >&6; }
42709if ${ac_cv_path_OBJDUMP+:} false; then :
42710  $as_echo_n "(cached) " >&6
42711else
42712  case $OBJDUMP in
42713  [\\/]* | ?:[\\/]*)
42714  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42715  ;;
42716  *)
42717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42718for as_dir in $PATH
42719do
42720  IFS=$as_save_IFS
42721  test -z "$as_dir" && as_dir=.
42722    for ac_exec_ext in '' $ac_executable_extensions; do
42723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42724    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42726    break 2
42727  fi
42728done
42729  done
42730IFS=$as_save_IFS
42731
42732  ;;
42733esac
42734fi
42735OBJDUMP=$ac_cv_path_OBJDUMP
42736if test -n "$OBJDUMP"; then
42737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42738$as_echo "$OBJDUMP" >&6; }
42739else
42740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42741$as_echo "no" >&6; }
42742fi
42743
42744
42745          if test "x$OBJDUMP" = x; then
42746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42747          fi
42748        else
42749          # Otherwise we believe it is a complete path. Use it as it is.
42750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42751$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42753$as_echo_n "checking for OBJDUMP... " >&6; }
42754          if test ! -x "$tool_specified"; then
42755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42756$as_echo "not found" >&6; }
42757            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42758          fi
42759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42760$as_echo "$tool_specified" >&6; }
42761        fi
42762      fi
42763    fi
42764
42765  fi
42766
42767
42768  if test "x$OBJDUMP" != x; then
42769    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42770    # bails if argument is missing.
42771
42772  # Only process if variable expands to non-empty
42773
42774  if test "x$OBJDUMP" != x; then
42775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42776
42777  # First separate the path from the arguments. This will split at the first
42778  # space.
42779  complete="$OBJDUMP"
42780  path="${complete%% *}"
42781  tmp="$complete EOL"
42782  arguments="${tmp#* }"
42783
42784  # Input might be given as Windows format, start by converting to
42785  # unix format.
42786  new_path=`$CYGPATH -u "$path"`
42787
42788  # Now try to locate executable using which
42789  new_path=`$WHICH "$new_path" 2> /dev/null`
42790  # bat and cmd files are not always considered executable in cygwin causing which
42791  # to not find them
42792  if test "x$new_path" = x \
42793      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42794      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42795    new_path=`$CYGPATH -u "$path"`
42796  fi
42797  if test "x$new_path" = x; then
42798    # Oops. Which didn't find the executable.
42799    # The splitting of arguments from the executable at a space might have been incorrect,
42800    # since paths with space are more likely in Windows. Give it another try with the whole
42801    # argument.
42802    path="$complete"
42803    arguments="EOL"
42804    new_path=`$CYGPATH -u "$path"`
42805    new_path=`$WHICH "$new_path" 2> /dev/null`
42806    # bat and cmd files are not always considered executable in cygwin causing which
42807    # to not find them
42808    if test "x$new_path" = x \
42809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42811      new_path=`$CYGPATH -u "$path"`
42812    fi
42813    if test "x$new_path" = x; then
42814      # It's still not found. Now this is an unrecoverable error.
42815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42816$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42817      has_space=`$ECHO "$complete" | $GREP " "`
42818      if test "x$has_space" != x; then
42819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42821      fi
42822      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42823    fi
42824  fi
42825
42826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42829  # "foo.exe" is OK but "foo" is an error.
42830  #
42831  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42832  # It is also a way to make sure we got the proper file name for the real test later on.
42833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42834  if test "x$test_shortpath" = x; then
42835    # Short path failed, file does not exist as specified.
42836    # Try adding .exe or .cmd
42837    if test -f "${new_path}.exe"; then
42838      input_to_shortpath="${new_path}.exe"
42839    elif test -f "${new_path}.cmd"; then
42840      input_to_shortpath="${new_path}.cmd"
42841    else
42842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42843$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42846      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42847    fi
42848  else
42849    input_to_shortpath="$new_path"
42850  fi
42851
42852  # Call helper function which possibly converts this using DOS-style short mode.
42853  # If so, the updated path is stored in $new_path.
42854  new_path="$input_to_shortpath"
42855
42856  input_path="$input_to_shortpath"
42857  # Check if we need to convert this using DOS-style short mode. If the path
42858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42859  # take no chances and rewrite it.
42860  # Note: m4 eats our [], so we need to use [ and ] instead.
42861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42862  if test "x$has_forbidden_chars" != x; then
42863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42867      # Going to short mode and back again did indeed matter. Since short mode is
42868      # case insensitive, let's make it lowercase to improve readability.
42869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42870      # Now convert it back to Unix-style (cygpath)
42871      input_path=`$CYGPATH -u "$shortmode_path"`
42872      new_path="$input_path"
42873    fi
42874  fi
42875
42876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42877  if test "x$test_cygdrive_prefix" = x; then
42878    # As a simple fix, exclude /usr/bin since it's not a real path.
42879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42881      # a path prefixed by /cygdrive for fixpath to work.
42882      new_path="$CYGWIN_ROOT_PATH$input_path"
42883    fi
42884  fi
42885
42886  # remove trailing .exe if any
42887  new_path="${new_path/%.exe/}"
42888
42889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42890
42891  # First separate the path from the arguments. This will split at the first
42892  # space.
42893  complete="$OBJDUMP"
42894  path="${complete%% *}"
42895  tmp="$complete EOL"
42896  arguments="${tmp#* }"
42897
42898  # Input might be given as Windows format, start by converting to
42899  # unix format.
42900  new_path="$path"
42901
42902  windows_path="$new_path"
42903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42904    unix_path=`$CYGPATH -u "$windows_path"`
42905    new_path="$unix_path"
42906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42908    new_path="$unix_path"
42909  fi
42910
42911
42912  # Now try to locate executable using which
42913  new_path=`$WHICH "$new_path" 2> /dev/null`
42914
42915  if test "x$new_path" = x; then
42916    # Oops. Which didn't find the executable.
42917    # The splitting of arguments from the executable at a space might have been incorrect,
42918    # since paths with space are more likely in Windows. Give it another try with the whole
42919    # argument.
42920    path="$complete"
42921    arguments="EOL"
42922    new_path="$path"
42923
42924  windows_path="$new_path"
42925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42926    unix_path=`$CYGPATH -u "$windows_path"`
42927    new_path="$unix_path"
42928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42930    new_path="$unix_path"
42931  fi
42932
42933
42934    new_path=`$WHICH "$new_path" 2> /dev/null`
42935    # bat and cmd files are not always considered executable in MSYS causing which
42936    # to not find them
42937    if test "x$new_path" = x \
42938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42940      new_path="$path"
42941
42942  windows_path="$new_path"
42943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42944    unix_path=`$CYGPATH -u "$windows_path"`
42945    new_path="$unix_path"
42946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42948    new_path="$unix_path"
42949  fi
42950
42951    fi
42952
42953    if test "x$new_path" = x; then
42954      # It's still not found. Now this is an unrecoverable error.
42955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42956$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42957      has_space=`$ECHO "$complete" | $GREP " "`
42958      if test "x$has_space" != x; then
42959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42961      fi
42962      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42963    fi
42964  fi
42965
42966  # Now new_path has a complete unix path to the binary
42967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42968    # Keep paths in /bin as-is, but remove trailing .exe if any
42969    new_path="${new_path/%.exe/}"
42970    # Do not save /bin paths to all_fixpath_prefixes!
42971  else
42972    # Not in mixed or Windows style, start by that.
42973    new_path=`cmd //c echo $new_path`
42974
42975  input_path="$new_path"
42976  # Check if we need to convert this using DOS-style short mode. If the path
42977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42978  # take no chances and rewrite it.
42979  # Note: m4 eats our [], so we need to use [ and ] instead.
42980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42981  if test "x$has_forbidden_chars" != x; then
42982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42984  fi
42985
42986    # Output is in $new_path
42987
42988  windows_path="$new_path"
42989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42990    unix_path=`$CYGPATH -u "$windows_path"`
42991    new_path="$unix_path"
42992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42994    new_path="$unix_path"
42995  fi
42996
42997    # remove trailing .exe if any
42998    new_path="${new_path/%.exe/}"
42999
43000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43002  fi
43003
43004    else
43005      # We're on a unix platform. Hooray! :)
43006      # First separate the path from the arguments. This will split at the first
43007      # space.
43008      complete="$OBJDUMP"
43009      path="${complete%% *}"
43010      tmp="$complete EOL"
43011      arguments="${tmp#* }"
43012
43013      # Cannot rely on the command "which" here since it doesn't always work.
43014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43015      if test -z "$is_absolute_path"; then
43016        # Path to executable is not absolute. Find it.
43017        IFS_save="$IFS"
43018        IFS=:
43019        for p in $PATH; do
43020          if test -f "$p/$path" && test -x "$p/$path"; then
43021            new_path="$p/$path"
43022            break
43023          fi
43024        done
43025        IFS="$IFS_save"
43026      else
43027        # This is an absolute path, we can use it without further modifications.
43028        new_path="$path"
43029      fi
43030
43031      if test "x$new_path" = x; then
43032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43033$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43034        has_space=`$ECHO "$complete" | $GREP " "`
43035        if test "x$has_space" != x; then
43036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43038        fi
43039        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43040      fi
43041    fi
43042
43043    # Now join together the path and the arguments once again
43044    if test "x$arguments" != xEOL; then
43045      new_complete="$new_path ${arguments% *}"
43046    else
43047      new_complete="$new_path"
43048    fi
43049
43050    if test "x$complete" != "x$new_complete"; then
43051      OBJDUMP="$new_complete"
43052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43053$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43054    fi
43055  fi
43056
43057  fi
43058
43059
43060  # Restore old path.
43061  PATH="$OLD_PATH"
43062
43063  # Restore the flags to the user specified values.
43064  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43065  CFLAGS="$ORG_CFLAGS"
43066  CXXFLAGS="$ORG_CXXFLAGS"
43067
43068
43069# Finally do some processing after the detection phase
43070
43071  if test "x$COMPILE_TYPE" = "xcross"; then
43072    # Now we need to find a C/C++ compiler that can build executables for the
43073    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43074    # used once. Also, we need to do this without adding a tools dir to the
43075    # path, otherwise we might pick up cross-compilers which don't use standard
43076    # naming.
43077
43078    OLDPATH="$PATH"
43079
43080
43081# Check whether --with-build-devkit was given.
43082if test "${with_build_devkit+set}" = set; then :
43083  withval=$with_build_devkit;
43084fi
43085
43086    if test "x$with_build_devkit" = "xyes"; then
43087      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43088    elif test -n "$with_build_devkit"; then
43089      if test ! -d "$with_build_devkit"; then
43090        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43091      else
43092
43093  # Only process if variable expands to non-empty
43094
43095  if test "x$with_build_devkit" != x; then
43096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43097
43098  # Input might be given as Windows format, start by converting to
43099  # unix format.
43100  path="$with_build_devkit"
43101  new_path=`$CYGPATH -u "$path"`
43102
43103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43106  # "foo.exe" is OK but "foo" is an error.
43107  #
43108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43109  # It is also a way to make sure we got the proper file name for the real test later on.
43110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43111  if test "x$test_shortpath" = x; then
43112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43113$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43114    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43115  fi
43116
43117  # Call helper function which possibly converts this using DOS-style short mode.
43118  # If so, the updated path is stored in $new_path.
43119
43120  input_path="$new_path"
43121  # Check if we need to convert this using DOS-style short mode. If the path
43122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43123  # take no chances and rewrite it.
43124  # Note: m4 eats our [], so we need to use [ and ] instead.
43125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43126  if test "x$has_forbidden_chars" != x; then
43127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43131      # Going to short mode and back again did indeed matter. Since short mode is
43132      # case insensitive, let's make it lowercase to improve readability.
43133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43134      # Now convert it back to Unix-style (cygpath)
43135      input_path=`$CYGPATH -u "$shortmode_path"`
43136      new_path="$input_path"
43137    fi
43138  fi
43139
43140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43141  if test "x$test_cygdrive_prefix" = x; then
43142    # As a simple fix, exclude /usr/bin since it's not a real path.
43143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43145      # a path prefixed by /cygdrive for fixpath to work.
43146      new_path="$CYGWIN_ROOT_PATH$input_path"
43147    fi
43148  fi
43149
43150
43151  if test "x$path" != "x$new_path"; then
43152    with_build_devkit="$new_path"
43153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43154$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43155  fi
43156
43157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43158
43159  path="$with_build_devkit"
43160  has_colon=`$ECHO $path | $GREP ^.:`
43161  new_path="$path"
43162  if test "x$has_colon" = x; then
43163    # Not in mixed or Windows style, start by that.
43164    new_path=`cmd //c echo $path`
43165  fi
43166
43167
43168  input_path="$new_path"
43169  # Check if we need to convert this using DOS-style short mode. If the path
43170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43171  # take no chances and rewrite it.
43172  # Note: m4 eats our [], so we need to use [ and ] instead.
43173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43174  if test "x$has_forbidden_chars" != x; then
43175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43177  fi
43178
43179
43180  windows_path="$new_path"
43181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43182    unix_path=`$CYGPATH -u "$windows_path"`
43183    new_path="$unix_path"
43184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43186    new_path="$unix_path"
43187  fi
43188
43189  if test "x$path" != "x$new_path"; then
43190    with_build_devkit="$new_path"
43191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43192$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43193  fi
43194
43195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43197
43198    else
43199      # We're on a unix platform. Hooray! :)
43200      path="$with_build_devkit"
43201      has_space=`$ECHO "$path" | $GREP " "`
43202      if test "x$has_space" != x; then
43203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43204$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43206      fi
43207
43208      # Use eval to expand a potential ~
43209      eval path="$path"
43210      if test ! -f "$path" && test ! -d "$path"; then
43211        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43212      fi
43213
43214      if test -d "$path"; then
43215        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43216      else
43217        dir="`$DIRNAME "$path"`"
43218        base="`$BASENAME "$path"`"
43219        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43220      fi
43221    fi
43222  fi
43223
43224        BUILD_DEVKIT_ROOT="$with_build_devkit"
43225        # Check for a meta data info file in the root of the devkit
43226        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43227          # Process devkit.info so that existing devkit variables are not
43228          # modified by this
43229          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43230              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43231              -e "s/\$host/\$build/g" \
43232              $BUILD_DEVKIT_ROOT/devkit.info \
43233              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43234          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43235          # This potentially sets the following:
43236          # A descriptive name of the devkit
43237
43238  if test "x$BUILD_DEVKIT_NAME" = x; then
43239    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43240  fi
43241
43242          # Corresponds to --with-extra-path
43243
43244  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43245    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43246  fi
43247
43248          # Corresponds to --with-toolchain-path
43249
43250  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43251    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43252  fi
43253
43254          # Corresponds to --with-sysroot
43255
43256  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43257    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43258  fi
43259
43260          # Skip the Window specific parts
43261        fi
43262
43263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43264$as_echo_n "checking for build platform devkit... " >&6; }
43265        if test "x$BUILD_DEVKIT_NAME" != x; then
43266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43267$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43268        else
43269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43270$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43271        fi
43272
43273        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43274
43275  if test "x$BUILD_SYSROOT" != "x"; then
43276    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43277      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43278        # Solaris Studio does not have a concept of sysroot. Instead we must
43279        # make sure the default include and lib dirs are appended to each
43280        # compile and link command line.
43281        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
43282        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43283            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43284            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43285      fi
43286    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43287      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43288      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43289    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43290      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43291      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43292    fi
43293    # Propagate the sysroot args to hotspot
43294    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43295    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43296    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43297    # The global CFLAGS and LDFLAGS variables need these for configure to function
43298    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43299    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43300    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43301    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43302  fi
43303
43304  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43305    # We also need -iframework<path>/System/Library/Frameworks
43306    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43307    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43308    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43309    # set this here so it doesn't have to be peppered throughout the forest
43310    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43311    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43312  fi
43313
43314
43315
43316
43317
43318         # Fallback default of just /bin if DEVKIT_PATH is not defined
43319        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43320          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43321        fi
43322        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43323      fi
43324    fi
43325
43326    # FIXME: we should list the discovered compilers as an exclude pattern!
43327    # If we do that, we can do this detection before POST_DETECTION, and still
43328    # find the build compilers in the tools dir, if needed.
43329
43330
43331
43332  # Publish this variable in the help.
43333
43334
43335  if [ -z "${BUILD_CC+x}" ]; then
43336    # The variable is not set by user, try to locate tool using the code snippet
43337    for ac_prog in cl cc gcc
43338do
43339  # Extract the first word of "$ac_prog", so it can be a program name with args.
43340set dummy $ac_prog; ac_word=$2
43341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43342$as_echo_n "checking for $ac_word... " >&6; }
43343if ${ac_cv_path_BUILD_CC+:} false; then :
43344  $as_echo_n "(cached) " >&6
43345else
43346  case $BUILD_CC in
43347  [\\/]* | ?:[\\/]*)
43348  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43349  ;;
43350  *)
43351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43352for as_dir in $PATH
43353do
43354  IFS=$as_save_IFS
43355  test -z "$as_dir" && as_dir=.
43356    for ac_exec_ext in '' $ac_executable_extensions; do
43357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43358    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43360    break 2
43361  fi
43362done
43363  done
43364IFS=$as_save_IFS
43365
43366  ;;
43367esac
43368fi
43369BUILD_CC=$ac_cv_path_BUILD_CC
43370if test -n "$BUILD_CC"; then
43371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43372$as_echo "$BUILD_CC" >&6; }
43373else
43374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43375$as_echo "no" >&6; }
43376fi
43377
43378
43379  test -n "$BUILD_CC" && break
43380done
43381
43382  else
43383    # The variable is set, but is it from the command line or the environment?
43384
43385    # Try to remove the string !BUILD_CC! from our list.
43386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43388      # If it failed, the variable was not from the command line. Ignore it,
43389      # but warn the user (except for BASH, which is always set by the calling BASH).
43390      if test "xBUILD_CC" != xBASH; then
43391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43392$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43393      fi
43394      # Try to locate tool using the code snippet
43395      for ac_prog in cl cc gcc
43396do
43397  # Extract the first word of "$ac_prog", so it can be a program name with args.
43398set dummy $ac_prog; ac_word=$2
43399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43400$as_echo_n "checking for $ac_word... " >&6; }
43401if ${ac_cv_path_BUILD_CC+:} false; then :
43402  $as_echo_n "(cached) " >&6
43403else
43404  case $BUILD_CC in
43405  [\\/]* | ?:[\\/]*)
43406  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43407  ;;
43408  *)
43409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43410for as_dir in $PATH
43411do
43412  IFS=$as_save_IFS
43413  test -z "$as_dir" && as_dir=.
43414    for ac_exec_ext in '' $ac_executable_extensions; do
43415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43416    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43418    break 2
43419  fi
43420done
43421  done
43422IFS=$as_save_IFS
43423
43424  ;;
43425esac
43426fi
43427BUILD_CC=$ac_cv_path_BUILD_CC
43428if test -n "$BUILD_CC"; then
43429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43430$as_echo "$BUILD_CC" >&6; }
43431else
43432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43433$as_echo "no" >&6; }
43434fi
43435
43436
43437  test -n "$BUILD_CC" && break
43438done
43439
43440    else
43441      # If it succeeded, then it was overridden by the user. We will use it
43442      # for the tool.
43443
43444      # First remove it from the list of overridden variables, so we can test
43445      # for unknown variables in the end.
43446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43447
43448      # Check if we try to supply an empty value
43449      if test "x$BUILD_CC" = x; then
43450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43451$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43453$as_echo_n "checking for BUILD_CC... " >&6; }
43454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43455$as_echo "disabled" >&6; }
43456      else
43457        # Check if the provided tool contains a complete path.
43458        tool_specified="$BUILD_CC"
43459        tool_basename="${tool_specified##*/}"
43460        if test "x$tool_basename" = "x$tool_specified"; then
43461          # A command without a complete path is provided, search $PATH.
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43463$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43464          # Extract the first word of "$tool_basename", so it can be a program name with args.
43465set dummy $tool_basename; ac_word=$2
43466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43467$as_echo_n "checking for $ac_word... " >&6; }
43468if ${ac_cv_path_BUILD_CC+:} false; then :
43469  $as_echo_n "(cached) " >&6
43470else
43471  case $BUILD_CC in
43472  [\\/]* | ?:[\\/]*)
43473  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43474  ;;
43475  *)
43476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43477for as_dir in $PATH
43478do
43479  IFS=$as_save_IFS
43480  test -z "$as_dir" && as_dir=.
43481    for ac_exec_ext in '' $ac_executable_extensions; do
43482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43483    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43485    break 2
43486  fi
43487done
43488  done
43489IFS=$as_save_IFS
43490
43491  ;;
43492esac
43493fi
43494BUILD_CC=$ac_cv_path_BUILD_CC
43495if test -n "$BUILD_CC"; then
43496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43497$as_echo "$BUILD_CC" >&6; }
43498else
43499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43500$as_echo "no" >&6; }
43501fi
43502
43503
43504          if test "x$BUILD_CC" = x; then
43505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43506          fi
43507        else
43508          # Otherwise we believe it is a complete path. Use it as it is.
43509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43510$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43512$as_echo_n "checking for BUILD_CC... " >&6; }
43513          if test ! -x "$tool_specified"; then
43514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43515$as_echo "not found" >&6; }
43516            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43517          fi
43518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43519$as_echo "$tool_specified" >&6; }
43520        fi
43521      fi
43522    fi
43523
43524  fi
43525
43526
43527
43528  if test "x$BUILD_CC" = x; then
43529    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43530  fi
43531
43532
43533
43534  # Only process if variable expands to non-empty
43535
43536  if test "x$BUILD_CC" != x; then
43537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43538
43539  # First separate the path from the arguments. This will split at the first
43540  # space.
43541  complete="$BUILD_CC"
43542  path="${complete%% *}"
43543  tmp="$complete EOL"
43544  arguments="${tmp#* }"
43545
43546  # Input might be given as Windows format, start by converting to
43547  # unix format.
43548  new_path=`$CYGPATH -u "$path"`
43549
43550  # Now try to locate executable using which
43551  new_path=`$WHICH "$new_path" 2> /dev/null`
43552  # bat and cmd files are not always considered executable in cygwin causing which
43553  # to not find them
43554  if test "x$new_path" = x \
43555      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43556      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43557    new_path=`$CYGPATH -u "$path"`
43558  fi
43559  if test "x$new_path" = x; then
43560    # Oops. Which didn't find the executable.
43561    # The splitting of arguments from the executable at a space might have been incorrect,
43562    # since paths with space are more likely in Windows. Give it another try with the whole
43563    # argument.
43564    path="$complete"
43565    arguments="EOL"
43566    new_path=`$CYGPATH -u "$path"`
43567    new_path=`$WHICH "$new_path" 2> /dev/null`
43568    # bat and cmd files are not always considered executable in cygwin causing which
43569    # to not find them
43570    if test "x$new_path" = x \
43571        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43572        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43573      new_path=`$CYGPATH -u "$path"`
43574    fi
43575    if test "x$new_path" = x; then
43576      # It's still not found. Now this is an unrecoverable error.
43577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43578$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43579      has_space=`$ECHO "$complete" | $GREP " "`
43580      if test "x$has_space" != x; then
43581        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43582$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43583      fi
43584      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43585    fi
43586  fi
43587
43588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43591  # "foo.exe" is OK but "foo" is an error.
43592  #
43593  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43594  # It is also a way to make sure we got the proper file name for the real test later on.
43595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43596  if test "x$test_shortpath" = x; then
43597    # Short path failed, file does not exist as specified.
43598    # Try adding .exe or .cmd
43599    if test -f "${new_path}.exe"; then
43600      input_to_shortpath="${new_path}.exe"
43601    elif test -f "${new_path}.cmd"; then
43602      input_to_shortpath="${new_path}.cmd"
43603    else
43604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43605$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43606      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43607$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43608      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43609    fi
43610  else
43611    input_to_shortpath="$new_path"
43612  fi
43613
43614  # Call helper function which possibly converts this using DOS-style short mode.
43615  # If so, the updated path is stored in $new_path.
43616  new_path="$input_to_shortpath"
43617
43618  input_path="$input_to_shortpath"
43619  # Check if we need to convert this using DOS-style short mode. If the path
43620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43621  # take no chances and rewrite it.
43622  # Note: m4 eats our [], so we need to use [ and ] instead.
43623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43624  if test "x$has_forbidden_chars" != x; then
43625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43629      # Going to short mode and back again did indeed matter. Since short mode is
43630      # case insensitive, let's make it lowercase to improve readability.
43631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43632      # Now convert it back to Unix-style (cygpath)
43633      input_path=`$CYGPATH -u "$shortmode_path"`
43634      new_path="$input_path"
43635    fi
43636  fi
43637
43638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43639  if test "x$test_cygdrive_prefix" = x; then
43640    # As a simple fix, exclude /usr/bin since it's not a real path.
43641    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43643      # a path prefixed by /cygdrive for fixpath to work.
43644      new_path="$CYGWIN_ROOT_PATH$input_path"
43645    fi
43646  fi
43647
43648  # remove trailing .exe if any
43649  new_path="${new_path/%.exe/}"
43650
43651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43652
43653  # First separate the path from the arguments. This will split at the first
43654  # space.
43655  complete="$BUILD_CC"
43656  path="${complete%% *}"
43657  tmp="$complete EOL"
43658  arguments="${tmp#* }"
43659
43660  # Input might be given as Windows format, start by converting to
43661  # unix format.
43662  new_path="$path"
43663
43664  windows_path="$new_path"
43665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43666    unix_path=`$CYGPATH -u "$windows_path"`
43667    new_path="$unix_path"
43668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43670    new_path="$unix_path"
43671  fi
43672
43673
43674  # Now try to locate executable using which
43675  new_path=`$WHICH "$new_path" 2> /dev/null`
43676
43677  if test "x$new_path" = x; then
43678    # Oops. Which didn't find the executable.
43679    # The splitting of arguments from the executable at a space might have been incorrect,
43680    # since paths with space are more likely in Windows. Give it another try with the whole
43681    # argument.
43682    path="$complete"
43683    arguments="EOL"
43684    new_path="$path"
43685
43686  windows_path="$new_path"
43687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43688    unix_path=`$CYGPATH -u "$windows_path"`
43689    new_path="$unix_path"
43690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43692    new_path="$unix_path"
43693  fi
43694
43695
43696    new_path=`$WHICH "$new_path" 2> /dev/null`
43697    # bat and cmd files are not always considered executable in MSYS causing which
43698    # to not find them
43699    if test "x$new_path" = x \
43700        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43701        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43702      new_path="$path"
43703
43704  windows_path="$new_path"
43705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43706    unix_path=`$CYGPATH -u "$windows_path"`
43707    new_path="$unix_path"
43708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43710    new_path="$unix_path"
43711  fi
43712
43713    fi
43714
43715    if test "x$new_path" = x; then
43716      # It's still not found. Now this is an unrecoverable error.
43717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43718$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43719      has_space=`$ECHO "$complete" | $GREP " "`
43720      if test "x$has_space" != x; then
43721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43723      fi
43724      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43725    fi
43726  fi
43727
43728  # Now new_path has a complete unix path to the binary
43729  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43730    # Keep paths in /bin as-is, but remove trailing .exe if any
43731    new_path="${new_path/%.exe/}"
43732    # Do not save /bin paths to all_fixpath_prefixes!
43733  else
43734    # Not in mixed or Windows style, start by that.
43735    new_path=`cmd //c echo $new_path`
43736
43737  input_path="$new_path"
43738  # Check if we need to convert this using DOS-style short mode. If the path
43739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43740  # take no chances and rewrite it.
43741  # Note: m4 eats our [], so we need to use [ and ] instead.
43742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43743  if test "x$has_forbidden_chars" != x; then
43744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43746  fi
43747
43748    # Output is in $new_path
43749
43750  windows_path="$new_path"
43751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43752    unix_path=`$CYGPATH -u "$windows_path"`
43753    new_path="$unix_path"
43754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43756    new_path="$unix_path"
43757  fi
43758
43759    # remove trailing .exe if any
43760    new_path="${new_path/%.exe/}"
43761
43762    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43763    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43764  fi
43765
43766    else
43767      # We're on a unix platform. Hooray! :)
43768      # First separate the path from the arguments. This will split at the first
43769      # space.
43770      complete="$BUILD_CC"
43771      path="${complete%% *}"
43772      tmp="$complete EOL"
43773      arguments="${tmp#* }"
43774
43775      # Cannot rely on the command "which" here since it doesn't always work.
43776      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43777      if test -z "$is_absolute_path"; then
43778        # Path to executable is not absolute. Find it.
43779        IFS_save="$IFS"
43780        IFS=:
43781        for p in $PATH; do
43782          if test -f "$p/$path" && test -x "$p/$path"; then
43783            new_path="$p/$path"
43784            break
43785          fi
43786        done
43787        IFS="$IFS_save"
43788      else
43789        # This is an absolute path, we can use it without further modifications.
43790        new_path="$path"
43791      fi
43792
43793      if test "x$new_path" = x; then
43794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43795$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43796        has_space=`$ECHO "$complete" | $GREP " "`
43797        if test "x$has_space" != x; then
43798          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43799$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43800        fi
43801        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43802      fi
43803    fi
43804
43805    # Now join together the path and the arguments once again
43806    if test "x$arguments" != xEOL; then
43807      new_complete="$new_path ${arguments% *}"
43808    else
43809      new_complete="$new_path"
43810    fi
43811
43812    if test "x$complete" != "x$new_complete"; then
43813      BUILD_CC="$new_complete"
43814      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43815$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43816    fi
43817  fi
43818
43819
43820
43821
43822  # Publish this variable in the help.
43823
43824
43825  if [ -z "${BUILD_CXX+x}" ]; then
43826    # The variable is not set by user, try to locate tool using the code snippet
43827    for ac_prog in cl CC g++
43828do
43829  # Extract the first word of "$ac_prog", so it can be a program name with args.
43830set dummy $ac_prog; ac_word=$2
43831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43832$as_echo_n "checking for $ac_word... " >&6; }
43833if ${ac_cv_path_BUILD_CXX+:} false; then :
43834  $as_echo_n "(cached) " >&6
43835else
43836  case $BUILD_CXX in
43837  [\\/]* | ?:[\\/]*)
43838  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43839  ;;
43840  *)
43841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43842for as_dir in $PATH
43843do
43844  IFS=$as_save_IFS
43845  test -z "$as_dir" && as_dir=.
43846    for ac_exec_ext in '' $ac_executable_extensions; do
43847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43848    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43850    break 2
43851  fi
43852done
43853  done
43854IFS=$as_save_IFS
43855
43856  ;;
43857esac
43858fi
43859BUILD_CXX=$ac_cv_path_BUILD_CXX
43860if test -n "$BUILD_CXX"; then
43861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43862$as_echo "$BUILD_CXX" >&6; }
43863else
43864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43865$as_echo "no" >&6; }
43866fi
43867
43868
43869  test -n "$BUILD_CXX" && break
43870done
43871
43872  else
43873    # The variable is set, but is it from the command line or the environment?
43874
43875    # Try to remove the string !BUILD_CXX! from our list.
43876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43878      # If it failed, the variable was not from the command line. Ignore it,
43879      # but warn the user (except for BASH, which is always set by the calling BASH).
43880      if test "xBUILD_CXX" != xBASH; then
43881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43882$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43883      fi
43884      # Try to locate tool using the code snippet
43885      for ac_prog in cl CC g++
43886do
43887  # Extract the first word of "$ac_prog", so it can be a program name with args.
43888set dummy $ac_prog; ac_word=$2
43889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43890$as_echo_n "checking for $ac_word... " >&6; }
43891if ${ac_cv_path_BUILD_CXX+:} false; then :
43892  $as_echo_n "(cached) " >&6
43893else
43894  case $BUILD_CXX in
43895  [\\/]* | ?:[\\/]*)
43896  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43897  ;;
43898  *)
43899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43900for as_dir in $PATH
43901do
43902  IFS=$as_save_IFS
43903  test -z "$as_dir" && as_dir=.
43904    for ac_exec_ext in '' $ac_executable_extensions; do
43905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43906    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43908    break 2
43909  fi
43910done
43911  done
43912IFS=$as_save_IFS
43913
43914  ;;
43915esac
43916fi
43917BUILD_CXX=$ac_cv_path_BUILD_CXX
43918if test -n "$BUILD_CXX"; then
43919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43920$as_echo "$BUILD_CXX" >&6; }
43921else
43922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43923$as_echo "no" >&6; }
43924fi
43925
43926
43927  test -n "$BUILD_CXX" && break
43928done
43929
43930    else
43931      # If it succeeded, then it was overridden by the user. We will use it
43932      # for the tool.
43933
43934      # First remove it from the list of overridden variables, so we can test
43935      # for unknown variables in the end.
43936      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43937
43938      # Check if we try to supply an empty value
43939      if test "x$BUILD_CXX" = x; then
43940        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43941$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43943$as_echo_n "checking for BUILD_CXX... " >&6; }
43944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43945$as_echo "disabled" >&6; }
43946      else
43947        # Check if the provided tool contains a complete path.
43948        tool_specified="$BUILD_CXX"
43949        tool_basename="${tool_specified##*/}"
43950        if test "x$tool_basename" = "x$tool_specified"; then
43951          # A command without a complete path is provided, search $PATH.
43952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43953$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43954          # Extract the first word of "$tool_basename", so it can be a program name with args.
43955set dummy $tool_basename; ac_word=$2
43956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43957$as_echo_n "checking for $ac_word... " >&6; }
43958if ${ac_cv_path_BUILD_CXX+:} false; then :
43959  $as_echo_n "(cached) " >&6
43960else
43961  case $BUILD_CXX in
43962  [\\/]* | ?:[\\/]*)
43963  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43964  ;;
43965  *)
43966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43967for as_dir in $PATH
43968do
43969  IFS=$as_save_IFS
43970  test -z "$as_dir" && as_dir=.
43971    for ac_exec_ext in '' $ac_executable_extensions; do
43972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43973    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43975    break 2
43976  fi
43977done
43978  done
43979IFS=$as_save_IFS
43980
43981  ;;
43982esac
43983fi
43984BUILD_CXX=$ac_cv_path_BUILD_CXX
43985if test -n "$BUILD_CXX"; then
43986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43987$as_echo "$BUILD_CXX" >&6; }
43988else
43989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43990$as_echo "no" >&6; }
43991fi
43992
43993
43994          if test "x$BUILD_CXX" = x; then
43995            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43996          fi
43997        else
43998          # Otherwise we believe it is a complete path. Use it as it is.
43999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44000$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44001          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44002$as_echo_n "checking for BUILD_CXX... " >&6; }
44003          if test ! -x "$tool_specified"; then
44004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44005$as_echo "not found" >&6; }
44006            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44007          fi
44008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44009$as_echo "$tool_specified" >&6; }
44010        fi
44011      fi
44012    fi
44013
44014  fi
44015
44016
44017
44018  if test "x$BUILD_CXX" = x; then
44019    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44020  fi
44021
44022
44023
44024  # Only process if variable expands to non-empty
44025
44026  if test "x$BUILD_CXX" != x; then
44027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44028
44029  # First separate the path from the arguments. This will split at the first
44030  # space.
44031  complete="$BUILD_CXX"
44032  path="${complete%% *}"
44033  tmp="$complete EOL"
44034  arguments="${tmp#* }"
44035
44036  # Input might be given as Windows format, start by converting to
44037  # unix format.
44038  new_path=`$CYGPATH -u "$path"`
44039
44040  # Now try to locate executable using which
44041  new_path=`$WHICH "$new_path" 2> /dev/null`
44042  # bat and cmd files are not always considered executable in cygwin causing which
44043  # to not find them
44044  if test "x$new_path" = x \
44045      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44046      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44047    new_path=`$CYGPATH -u "$path"`
44048  fi
44049  if test "x$new_path" = x; then
44050    # Oops. Which didn't find the executable.
44051    # The splitting of arguments from the executable at a space might have been incorrect,
44052    # since paths with space are more likely in Windows. Give it another try with the whole
44053    # argument.
44054    path="$complete"
44055    arguments="EOL"
44056    new_path=`$CYGPATH -u "$path"`
44057    new_path=`$WHICH "$new_path" 2> /dev/null`
44058    # bat and cmd files are not always considered executable in cygwin causing which
44059    # to not find them
44060    if test "x$new_path" = x \
44061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44063      new_path=`$CYGPATH -u "$path"`
44064    fi
44065    if test "x$new_path" = x; then
44066      # It's still not found. Now this is an unrecoverable error.
44067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44068$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44069      has_space=`$ECHO "$complete" | $GREP " "`
44070      if test "x$has_space" != x; then
44071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44073      fi
44074      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44075    fi
44076  fi
44077
44078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44081  # "foo.exe" is OK but "foo" is an error.
44082  #
44083  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44084  # It is also a way to make sure we got the proper file name for the real test later on.
44085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44086  if test "x$test_shortpath" = x; then
44087    # Short path failed, file does not exist as specified.
44088    # Try adding .exe or .cmd
44089    if test -f "${new_path}.exe"; then
44090      input_to_shortpath="${new_path}.exe"
44091    elif test -f "${new_path}.cmd"; then
44092      input_to_shortpath="${new_path}.cmd"
44093    else
44094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44095$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44098      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44099    fi
44100  else
44101    input_to_shortpath="$new_path"
44102  fi
44103
44104  # Call helper function which possibly converts this using DOS-style short mode.
44105  # If so, the updated path is stored in $new_path.
44106  new_path="$input_to_shortpath"
44107
44108  input_path="$input_to_shortpath"
44109  # Check if we need to convert this using DOS-style short mode. If the path
44110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44111  # take no chances and rewrite it.
44112  # Note: m4 eats our [], so we need to use [ and ] instead.
44113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44114  if test "x$has_forbidden_chars" != x; then
44115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44119      # Going to short mode and back again did indeed matter. Since short mode is
44120      # case insensitive, let's make it lowercase to improve readability.
44121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44122      # Now convert it back to Unix-style (cygpath)
44123      input_path=`$CYGPATH -u "$shortmode_path"`
44124      new_path="$input_path"
44125    fi
44126  fi
44127
44128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44129  if test "x$test_cygdrive_prefix" = x; then
44130    # As a simple fix, exclude /usr/bin since it's not a real path.
44131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44133      # a path prefixed by /cygdrive for fixpath to work.
44134      new_path="$CYGWIN_ROOT_PATH$input_path"
44135    fi
44136  fi
44137
44138  # remove trailing .exe if any
44139  new_path="${new_path/%.exe/}"
44140
44141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44142
44143  # First separate the path from the arguments. This will split at the first
44144  # space.
44145  complete="$BUILD_CXX"
44146  path="${complete%% *}"
44147  tmp="$complete EOL"
44148  arguments="${tmp#* }"
44149
44150  # Input might be given as Windows format, start by converting to
44151  # unix format.
44152  new_path="$path"
44153
44154  windows_path="$new_path"
44155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44156    unix_path=`$CYGPATH -u "$windows_path"`
44157    new_path="$unix_path"
44158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44160    new_path="$unix_path"
44161  fi
44162
44163
44164  # Now try to locate executable using which
44165  new_path=`$WHICH "$new_path" 2> /dev/null`
44166
44167  if test "x$new_path" = x; then
44168    # Oops. Which didn't find the executable.
44169    # The splitting of arguments from the executable at a space might have been incorrect,
44170    # since paths with space are more likely in Windows. Give it another try with the whole
44171    # argument.
44172    path="$complete"
44173    arguments="EOL"
44174    new_path="$path"
44175
44176  windows_path="$new_path"
44177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44178    unix_path=`$CYGPATH -u "$windows_path"`
44179    new_path="$unix_path"
44180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44182    new_path="$unix_path"
44183  fi
44184
44185
44186    new_path=`$WHICH "$new_path" 2> /dev/null`
44187    # bat and cmd files are not always considered executable in MSYS causing which
44188    # to not find them
44189    if test "x$new_path" = x \
44190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44192      new_path="$path"
44193
44194  windows_path="$new_path"
44195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44196    unix_path=`$CYGPATH -u "$windows_path"`
44197    new_path="$unix_path"
44198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44200    new_path="$unix_path"
44201  fi
44202
44203    fi
44204
44205    if test "x$new_path" = x; then
44206      # It's still not found. Now this is an unrecoverable error.
44207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44208$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44209      has_space=`$ECHO "$complete" | $GREP " "`
44210      if test "x$has_space" != x; then
44211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44213      fi
44214      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44215    fi
44216  fi
44217
44218  # Now new_path has a complete unix path to the binary
44219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44220    # Keep paths in /bin as-is, but remove trailing .exe if any
44221    new_path="${new_path/%.exe/}"
44222    # Do not save /bin paths to all_fixpath_prefixes!
44223  else
44224    # Not in mixed or Windows style, start by that.
44225    new_path=`cmd //c echo $new_path`
44226
44227  input_path="$new_path"
44228  # Check if we need to convert this using DOS-style short mode. If the path
44229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44230  # take no chances and rewrite it.
44231  # Note: m4 eats our [], so we need to use [ and ] instead.
44232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44233  if test "x$has_forbidden_chars" != x; then
44234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44236  fi
44237
44238    # Output is in $new_path
44239
44240  windows_path="$new_path"
44241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44242    unix_path=`$CYGPATH -u "$windows_path"`
44243    new_path="$unix_path"
44244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44246    new_path="$unix_path"
44247  fi
44248
44249    # remove trailing .exe if any
44250    new_path="${new_path/%.exe/}"
44251
44252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44254  fi
44255
44256    else
44257      # We're on a unix platform. Hooray! :)
44258      # First separate the path from the arguments. This will split at the first
44259      # space.
44260      complete="$BUILD_CXX"
44261      path="${complete%% *}"
44262      tmp="$complete EOL"
44263      arguments="${tmp#* }"
44264
44265      # Cannot rely on the command "which" here since it doesn't always work.
44266      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44267      if test -z "$is_absolute_path"; then
44268        # Path to executable is not absolute. Find it.
44269        IFS_save="$IFS"
44270        IFS=:
44271        for p in $PATH; do
44272          if test -f "$p/$path" && test -x "$p/$path"; then
44273            new_path="$p/$path"
44274            break
44275          fi
44276        done
44277        IFS="$IFS_save"
44278      else
44279        # This is an absolute path, we can use it without further modifications.
44280        new_path="$path"
44281      fi
44282
44283      if test "x$new_path" = x; then
44284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44285$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44286        has_space=`$ECHO "$complete" | $GREP " "`
44287        if test "x$has_space" != x; then
44288          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44290        fi
44291        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44292      fi
44293    fi
44294
44295    # Now join together the path and the arguments once again
44296    if test "x$arguments" != xEOL; then
44297      new_complete="$new_path ${arguments% *}"
44298    else
44299      new_complete="$new_path"
44300    fi
44301
44302    if test "x$complete" != "x$new_complete"; then
44303      BUILD_CXX="$new_complete"
44304      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44305$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44306    fi
44307  fi
44308
44309
44310
44311  # Publish this variable in the help.
44312
44313
44314  if [ -z "${BUILD_NM+x}" ]; then
44315    # The variable is not set by user, try to locate tool using the code snippet
44316    for ac_prog in nm gcc-nm
44317do
44318  # Extract the first word of "$ac_prog", so it can be a program name with args.
44319set dummy $ac_prog; ac_word=$2
44320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44321$as_echo_n "checking for $ac_word... " >&6; }
44322if ${ac_cv_path_BUILD_NM+:} false; then :
44323  $as_echo_n "(cached) " >&6
44324else
44325  case $BUILD_NM in
44326  [\\/]* | ?:[\\/]*)
44327  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44328  ;;
44329  *)
44330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44331for as_dir in $PATH
44332do
44333  IFS=$as_save_IFS
44334  test -z "$as_dir" && as_dir=.
44335    for ac_exec_ext in '' $ac_executable_extensions; do
44336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44337    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44339    break 2
44340  fi
44341done
44342  done
44343IFS=$as_save_IFS
44344
44345  ;;
44346esac
44347fi
44348BUILD_NM=$ac_cv_path_BUILD_NM
44349if test -n "$BUILD_NM"; then
44350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44351$as_echo "$BUILD_NM" >&6; }
44352else
44353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44354$as_echo "no" >&6; }
44355fi
44356
44357
44358  test -n "$BUILD_NM" && break
44359done
44360
44361  else
44362    # The variable is set, but is it from the command line or the environment?
44363
44364    # Try to remove the string !BUILD_NM! from our list.
44365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44367      # If it failed, the variable was not from the command line. Ignore it,
44368      # but warn the user (except for BASH, which is always set by the calling BASH).
44369      if test "xBUILD_NM" != xBASH; then
44370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44371$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44372      fi
44373      # Try to locate tool using the code snippet
44374      for ac_prog in nm gcc-nm
44375do
44376  # Extract the first word of "$ac_prog", so it can be a program name with args.
44377set dummy $ac_prog; ac_word=$2
44378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44379$as_echo_n "checking for $ac_word... " >&6; }
44380if ${ac_cv_path_BUILD_NM+:} false; then :
44381  $as_echo_n "(cached) " >&6
44382else
44383  case $BUILD_NM in
44384  [\\/]* | ?:[\\/]*)
44385  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44386  ;;
44387  *)
44388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44389for as_dir in $PATH
44390do
44391  IFS=$as_save_IFS
44392  test -z "$as_dir" && as_dir=.
44393    for ac_exec_ext in '' $ac_executable_extensions; do
44394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44395    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44397    break 2
44398  fi
44399done
44400  done
44401IFS=$as_save_IFS
44402
44403  ;;
44404esac
44405fi
44406BUILD_NM=$ac_cv_path_BUILD_NM
44407if test -n "$BUILD_NM"; then
44408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44409$as_echo "$BUILD_NM" >&6; }
44410else
44411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44412$as_echo "no" >&6; }
44413fi
44414
44415
44416  test -n "$BUILD_NM" && break
44417done
44418
44419    else
44420      # If it succeeded, then it was overridden by the user. We will use it
44421      # for the tool.
44422
44423      # First remove it from the list of overridden variables, so we can test
44424      # for unknown variables in the end.
44425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44426
44427      # Check if we try to supply an empty value
44428      if test "x$BUILD_NM" = x; then
44429        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44430$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44432$as_echo_n "checking for BUILD_NM... " >&6; }
44433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44434$as_echo "disabled" >&6; }
44435      else
44436        # Check if the provided tool contains a complete path.
44437        tool_specified="$BUILD_NM"
44438        tool_basename="${tool_specified##*/}"
44439        if test "x$tool_basename" = "x$tool_specified"; then
44440          # A command without a complete path is provided, search $PATH.
44441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44442$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44443          # Extract the first word of "$tool_basename", so it can be a program name with args.
44444set dummy $tool_basename; ac_word=$2
44445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44446$as_echo_n "checking for $ac_word... " >&6; }
44447if ${ac_cv_path_BUILD_NM+:} false; then :
44448  $as_echo_n "(cached) " >&6
44449else
44450  case $BUILD_NM in
44451  [\\/]* | ?:[\\/]*)
44452  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44453  ;;
44454  *)
44455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44456for as_dir in $PATH
44457do
44458  IFS=$as_save_IFS
44459  test -z "$as_dir" && as_dir=.
44460    for ac_exec_ext in '' $ac_executable_extensions; do
44461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44462    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44464    break 2
44465  fi
44466done
44467  done
44468IFS=$as_save_IFS
44469
44470  ;;
44471esac
44472fi
44473BUILD_NM=$ac_cv_path_BUILD_NM
44474if test -n "$BUILD_NM"; then
44475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44476$as_echo "$BUILD_NM" >&6; }
44477else
44478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44479$as_echo "no" >&6; }
44480fi
44481
44482
44483          if test "x$BUILD_NM" = x; then
44484            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44485          fi
44486        else
44487          # Otherwise we believe it is a complete path. Use it as it is.
44488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44489$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44490          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44491$as_echo_n "checking for BUILD_NM... " >&6; }
44492          if test ! -x "$tool_specified"; then
44493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44494$as_echo "not found" >&6; }
44495            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44496          fi
44497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44498$as_echo "$tool_specified" >&6; }
44499        fi
44500      fi
44501    fi
44502
44503  fi
44504
44505
44506
44507  # Only process if variable expands to non-empty
44508
44509  if test "x$BUILD_NM" != x; then
44510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44511
44512  # First separate the path from the arguments. This will split at the first
44513  # space.
44514  complete="$BUILD_NM"
44515  path="${complete%% *}"
44516  tmp="$complete EOL"
44517  arguments="${tmp#* }"
44518
44519  # Input might be given as Windows format, start by converting to
44520  # unix format.
44521  new_path=`$CYGPATH -u "$path"`
44522
44523  # Now try to locate executable using which
44524  new_path=`$WHICH "$new_path" 2> /dev/null`
44525  # bat and cmd files are not always considered executable in cygwin causing which
44526  # to not find them
44527  if test "x$new_path" = x \
44528      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44529      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44530    new_path=`$CYGPATH -u "$path"`
44531  fi
44532  if test "x$new_path" = x; then
44533    # Oops. Which didn't find the executable.
44534    # The splitting of arguments from the executable at a space might have been incorrect,
44535    # since paths with space are more likely in Windows. Give it another try with the whole
44536    # argument.
44537    path="$complete"
44538    arguments="EOL"
44539    new_path=`$CYGPATH -u "$path"`
44540    new_path=`$WHICH "$new_path" 2> /dev/null`
44541    # bat and cmd files are not always considered executable in cygwin causing which
44542    # to not find them
44543    if test "x$new_path" = x \
44544        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44545        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44546      new_path=`$CYGPATH -u "$path"`
44547    fi
44548    if test "x$new_path" = x; then
44549      # It's still not found. Now this is an unrecoverable error.
44550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44551$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44552      has_space=`$ECHO "$complete" | $GREP " "`
44553      if test "x$has_space" != x; then
44554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44556      fi
44557      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44558    fi
44559  fi
44560
44561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44564  # "foo.exe" is OK but "foo" is an error.
44565  #
44566  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44567  # It is also a way to make sure we got the proper file name for the real test later on.
44568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44569  if test "x$test_shortpath" = x; then
44570    # Short path failed, file does not exist as specified.
44571    # Try adding .exe or .cmd
44572    if test -f "${new_path}.exe"; then
44573      input_to_shortpath="${new_path}.exe"
44574    elif test -f "${new_path}.cmd"; then
44575      input_to_shortpath="${new_path}.cmd"
44576    else
44577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44578$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44579      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44580$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44581      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44582    fi
44583  else
44584    input_to_shortpath="$new_path"
44585  fi
44586
44587  # Call helper function which possibly converts this using DOS-style short mode.
44588  # If so, the updated path is stored in $new_path.
44589  new_path="$input_to_shortpath"
44590
44591  input_path="$input_to_shortpath"
44592  # Check if we need to convert this using DOS-style short mode. If the path
44593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44594  # take no chances and rewrite it.
44595  # Note: m4 eats our [], so we need to use [ and ] instead.
44596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44597  if test "x$has_forbidden_chars" != x; then
44598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44602      # Going to short mode and back again did indeed matter. Since short mode is
44603      # case insensitive, let's make it lowercase to improve readability.
44604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44605      # Now convert it back to Unix-style (cygpath)
44606      input_path=`$CYGPATH -u "$shortmode_path"`
44607      new_path="$input_path"
44608    fi
44609  fi
44610
44611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44612  if test "x$test_cygdrive_prefix" = x; then
44613    # As a simple fix, exclude /usr/bin since it's not a real path.
44614    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44616      # a path prefixed by /cygdrive for fixpath to work.
44617      new_path="$CYGWIN_ROOT_PATH$input_path"
44618    fi
44619  fi
44620
44621  # remove trailing .exe if any
44622  new_path="${new_path/%.exe/}"
44623
44624    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44625
44626  # First separate the path from the arguments. This will split at the first
44627  # space.
44628  complete="$BUILD_NM"
44629  path="${complete%% *}"
44630  tmp="$complete EOL"
44631  arguments="${tmp#* }"
44632
44633  # Input might be given as Windows format, start by converting to
44634  # unix format.
44635  new_path="$path"
44636
44637  windows_path="$new_path"
44638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44639    unix_path=`$CYGPATH -u "$windows_path"`
44640    new_path="$unix_path"
44641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44643    new_path="$unix_path"
44644  fi
44645
44646
44647  # Now try to locate executable using which
44648  new_path=`$WHICH "$new_path" 2> /dev/null`
44649
44650  if test "x$new_path" = x; then
44651    # Oops. Which didn't find the executable.
44652    # The splitting of arguments from the executable at a space might have been incorrect,
44653    # since paths with space are more likely in Windows. Give it another try with the whole
44654    # argument.
44655    path="$complete"
44656    arguments="EOL"
44657    new_path="$path"
44658
44659  windows_path="$new_path"
44660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44661    unix_path=`$CYGPATH -u "$windows_path"`
44662    new_path="$unix_path"
44663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44665    new_path="$unix_path"
44666  fi
44667
44668
44669    new_path=`$WHICH "$new_path" 2> /dev/null`
44670    # bat and cmd files are not always considered executable in MSYS causing which
44671    # to not find them
44672    if test "x$new_path" = x \
44673        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44674        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44675      new_path="$path"
44676
44677  windows_path="$new_path"
44678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44679    unix_path=`$CYGPATH -u "$windows_path"`
44680    new_path="$unix_path"
44681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44683    new_path="$unix_path"
44684  fi
44685
44686    fi
44687
44688    if test "x$new_path" = x; then
44689      # It's still not found. Now this is an unrecoverable error.
44690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44691$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44692      has_space=`$ECHO "$complete" | $GREP " "`
44693      if test "x$has_space" != x; then
44694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44696      fi
44697      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44698    fi
44699  fi
44700
44701  # Now new_path has a complete unix path to the binary
44702  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44703    # Keep paths in /bin as-is, but remove trailing .exe if any
44704    new_path="${new_path/%.exe/}"
44705    # Do not save /bin paths to all_fixpath_prefixes!
44706  else
44707    # Not in mixed or Windows style, start by that.
44708    new_path=`cmd //c echo $new_path`
44709
44710  input_path="$new_path"
44711  # Check if we need to convert this using DOS-style short mode. If the path
44712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44713  # take no chances and rewrite it.
44714  # Note: m4 eats our [], so we need to use [ and ] instead.
44715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44716  if test "x$has_forbidden_chars" != x; then
44717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44719  fi
44720
44721    # Output is in $new_path
44722
44723  windows_path="$new_path"
44724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44725    unix_path=`$CYGPATH -u "$windows_path"`
44726    new_path="$unix_path"
44727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44729    new_path="$unix_path"
44730  fi
44731
44732    # remove trailing .exe if any
44733    new_path="${new_path/%.exe/}"
44734
44735    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44736    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44737  fi
44738
44739    else
44740      # We're on a unix platform. Hooray! :)
44741      # First separate the path from the arguments. This will split at the first
44742      # space.
44743      complete="$BUILD_NM"
44744      path="${complete%% *}"
44745      tmp="$complete EOL"
44746      arguments="${tmp#* }"
44747
44748      # Cannot rely on the command "which" here since it doesn't always work.
44749      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44750      if test -z "$is_absolute_path"; then
44751        # Path to executable is not absolute. Find it.
44752        IFS_save="$IFS"
44753        IFS=:
44754        for p in $PATH; do
44755          if test -f "$p/$path" && test -x "$p/$path"; then
44756            new_path="$p/$path"
44757            break
44758          fi
44759        done
44760        IFS="$IFS_save"
44761      else
44762        # This is an absolute path, we can use it without further modifications.
44763        new_path="$path"
44764      fi
44765
44766      if test "x$new_path" = x; then
44767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44768$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44769        has_space=`$ECHO "$complete" | $GREP " "`
44770        if test "x$has_space" != x; then
44771          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44772$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44773        fi
44774        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44775      fi
44776    fi
44777
44778    # Now join together the path and the arguments once again
44779    if test "x$arguments" != xEOL; then
44780      new_complete="$new_path ${arguments% *}"
44781    else
44782      new_complete="$new_path"
44783    fi
44784
44785    if test "x$complete" != "x$new_complete"; then
44786      BUILD_NM="$new_complete"
44787      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44788$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44789    fi
44790  fi
44791
44792
44793
44794  # Publish this variable in the help.
44795
44796
44797  if [ -z "${BUILD_AR+x}" ]; then
44798    # The variable is not set by user, try to locate tool using the code snippet
44799    for ac_prog in ar gcc-ar
44800do
44801  # Extract the first word of "$ac_prog", so it can be a program name with args.
44802set dummy $ac_prog; ac_word=$2
44803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44804$as_echo_n "checking for $ac_word... " >&6; }
44805if ${ac_cv_path_BUILD_AR+:} false; then :
44806  $as_echo_n "(cached) " >&6
44807else
44808  case $BUILD_AR in
44809  [\\/]* | ?:[\\/]*)
44810  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44811  ;;
44812  *)
44813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44814for as_dir in $PATH
44815do
44816  IFS=$as_save_IFS
44817  test -z "$as_dir" && as_dir=.
44818    for ac_exec_ext in '' $ac_executable_extensions; do
44819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44820    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44822    break 2
44823  fi
44824done
44825  done
44826IFS=$as_save_IFS
44827
44828  ;;
44829esac
44830fi
44831BUILD_AR=$ac_cv_path_BUILD_AR
44832if test -n "$BUILD_AR"; then
44833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44834$as_echo "$BUILD_AR" >&6; }
44835else
44836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44837$as_echo "no" >&6; }
44838fi
44839
44840
44841  test -n "$BUILD_AR" && break
44842done
44843
44844  else
44845    # The variable is set, but is it from the command line or the environment?
44846
44847    # Try to remove the string !BUILD_AR! from our list.
44848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44850      # If it failed, the variable was not from the command line. Ignore it,
44851      # but warn the user (except for BASH, which is always set by the calling BASH).
44852      if test "xBUILD_AR" != xBASH; then
44853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44854$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44855      fi
44856      # Try to locate tool using the code snippet
44857      for ac_prog in ar gcc-ar
44858do
44859  # Extract the first word of "$ac_prog", so it can be a program name with args.
44860set dummy $ac_prog; ac_word=$2
44861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44862$as_echo_n "checking for $ac_word... " >&6; }
44863if ${ac_cv_path_BUILD_AR+:} false; then :
44864  $as_echo_n "(cached) " >&6
44865else
44866  case $BUILD_AR in
44867  [\\/]* | ?:[\\/]*)
44868  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44869  ;;
44870  *)
44871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44872for as_dir in $PATH
44873do
44874  IFS=$as_save_IFS
44875  test -z "$as_dir" && as_dir=.
44876    for ac_exec_ext in '' $ac_executable_extensions; do
44877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44878    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44880    break 2
44881  fi
44882done
44883  done
44884IFS=$as_save_IFS
44885
44886  ;;
44887esac
44888fi
44889BUILD_AR=$ac_cv_path_BUILD_AR
44890if test -n "$BUILD_AR"; then
44891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44892$as_echo "$BUILD_AR" >&6; }
44893else
44894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44895$as_echo "no" >&6; }
44896fi
44897
44898
44899  test -n "$BUILD_AR" && break
44900done
44901
44902    else
44903      # If it succeeded, then it was overridden by the user. We will use it
44904      # for the tool.
44905
44906      # First remove it from the list of overridden variables, so we can test
44907      # for unknown variables in the end.
44908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44909
44910      # Check if we try to supply an empty value
44911      if test "x$BUILD_AR" = x; then
44912        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44913$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44915$as_echo_n "checking for BUILD_AR... " >&6; }
44916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44917$as_echo "disabled" >&6; }
44918      else
44919        # Check if the provided tool contains a complete path.
44920        tool_specified="$BUILD_AR"
44921        tool_basename="${tool_specified##*/}"
44922        if test "x$tool_basename" = "x$tool_specified"; then
44923          # A command without a complete path is provided, search $PATH.
44924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44925$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44926          # Extract the first word of "$tool_basename", so it can be a program name with args.
44927set dummy $tool_basename; ac_word=$2
44928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44929$as_echo_n "checking for $ac_word... " >&6; }
44930if ${ac_cv_path_BUILD_AR+:} false; then :
44931  $as_echo_n "(cached) " >&6
44932else
44933  case $BUILD_AR in
44934  [\\/]* | ?:[\\/]*)
44935  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44936  ;;
44937  *)
44938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44939for as_dir in $PATH
44940do
44941  IFS=$as_save_IFS
44942  test -z "$as_dir" && as_dir=.
44943    for ac_exec_ext in '' $ac_executable_extensions; do
44944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44945    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44947    break 2
44948  fi
44949done
44950  done
44951IFS=$as_save_IFS
44952
44953  ;;
44954esac
44955fi
44956BUILD_AR=$ac_cv_path_BUILD_AR
44957if test -n "$BUILD_AR"; then
44958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44959$as_echo "$BUILD_AR" >&6; }
44960else
44961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44962$as_echo "no" >&6; }
44963fi
44964
44965
44966          if test "x$BUILD_AR" = x; then
44967            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44968          fi
44969        else
44970          # Otherwise we believe it is a complete path. Use it as it is.
44971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44972$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44973          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44974$as_echo_n "checking for BUILD_AR... " >&6; }
44975          if test ! -x "$tool_specified"; then
44976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44977$as_echo "not found" >&6; }
44978            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44979          fi
44980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44981$as_echo "$tool_specified" >&6; }
44982        fi
44983      fi
44984    fi
44985
44986  fi
44987
44988
44989
44990  # Only process if variable expands to non-empty
44991
44992  if test "x$BUILD_AR" != x; then
44993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44994
44995  # First separate the path from the arguments. This will split at the first
44996  # space.
44997  complete="$BUILD_AR"
44998  path="${complete%% *}"
44999  tmp="$complete EOL"
45000  arguments="${tmp#* }"
45001
45002  # Input might be given as Windows format, start by converting to
45003  # unix format.
45004  new_path=`$CYGPATH -u "$path"`
45005
45006  # Now try to locate executable using which
45007  new_path=`$WHICH "$new_path" 2> /dev/null`
45008  # bat and cmd files are not always considered executable in cygwin causing which
45009  # to not find them
45010  if test "x$new_path" = x \
45011      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45012      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45013    new_path=`$CYGPATH -u "$path"`
45014  fi
45015  if test "x$new_path" = x; then
45016    # Oops. Which didn't find the executable.
45017    # The splitting of arguments from the executable at a space might have been incorrect,
45018    # since paths with space are more likely in Windows. Give it another try with the whole
45019    # argument.
45020    path="$complete"
45021    arguments="EOL"
45022    new_path=`$CYGPATH -u "$path"`
45023    new_path=`$WHICH "$new_path" 2> /dev/null`
45024    # bat and cmd files are not always considered executable in cygwin causing which
45025    # to not find them
45026    if test "x$new_path" = x \
45027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45029      new_path=`$CYGPATH -u "$path"`
45030    fi
45031    if test "x$new_path" = x; then
45032      # It's still not found. Now this is an unrecoverable error.
45033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45034$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45035      has_space=`$ECHO "$complete" | $GREP " "`
45036      if test "x$has_space" != x; then
45037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45039      fi
45040      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45041    fi
45042  fi
45043
45044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45047  # "foo.exe" is OK but "foo" is an error.
45048  #
45049  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45050  # It is also a way to make sure we got the proper file name for the real test later on.
45051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45052  if test "x$test_shortpath" = x; then
45053    # Short path failed, file does not exist as specified.
45054    # Try adding .exe or .cmd
45055    if test -f "${new_path}.exe"; then
45056      input_to_shortpath="${new_path}.exe"
45057    elif test -f "${new_path}.cmd"; then
45058      input_to_shortpath="${new_path}.cmd"
45059    else
45060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45061$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45062      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45063$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45064      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45065    fi
45066  else
45067    input_to_shortpath="$new_path"
45068  fi
45069
45070  # Call helper function which possibly converts this using DOS-style short mode.
45071  # If so, the updated path is stored in $new_path.
45072  new_path="$input_to_shortpath"
45073
45074  input_path="$input_to_shortpath"
45075  # Check if we need to convert this using DOS-style short mode. If the path
45076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45077  # take no chances and rewrite it.
45078  # Note: m4 eats our [], so we need to use [ and ] instead.
45079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45080  if test "x$has_forbidden_chars" != x; then
45081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45085      # Going to short mode and back again did indeed matter. Since short mode is
45086      # case insensitive, let's make it lowercase to improve readability.
45087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45088      # Now convert it back to Unix-style (cygpath)
45089      input_path=`$CYGPATH -u "$shortmode_path"`
45090      new_path="$input_path"
45091    fi
45092  fi
45093
45094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45095  if test "x$test_cygdrive_prefix" = x; then
45096    # As a simple fix, exclude /usr/bin since it's not a real path.
45097    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45099      # a path prefixed by /cygdrive for fixpath to work.
45100      new_path="$CYGWIN_ROOT_PATH$input_path"
45101    fi
45102  fi
45103
45104  # remove trailing .exe if any
45105  new_path="${new_path/%.exe/}"
45106
45107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45108
45109  # First separate the path from the arguments. This will split at the first
45110  # space.
45111  complete="$BUILD_AR"
45112  path="${complete%% *}"
45113  tmp="$complete EOL"
45114  arguments="${tmp#* }"
45115
45116  # Input might be given as Windows format, start by converting to
45117  # unix format.
45118  new_path="$path"
45119
45120  windows_path="$new_path"
45121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45122    unix_path=`$CYGPATH -u "$windows_path"`
45123    new_path="$unix_path"
45124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45126    new_path="$unix_path"
45127  fi
45128
45129
45130  # Now try to locate executable using which
45131  new_path=`$WHICH "$new_path" 2> /dev/null`
45132
45133  if test "x$new_path" = x; then
45134    # Oops. Which didn't find the executable.
45135    # The splitting of arguments from the executable at a space might have been incorrect,
45136    # since paths with space are more likely in Windows. Give it another try with the whole
45137    # argument.
45138    path="$complete"
45139    arguments="EOL"
45140    new_path="$path"
45141
45142  windows_path="$new_path"
45143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45144    unix_path=`$CYGPATH -u "$windows_path"`
45145    new_path="$unix_path"
45146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45148    new_path="$unix_path"
45149  fi
45150
45151
45152    new_path=`$WHICH "$new_path" 2> /dev/null`
45153    # bat and cmd files are not always considered executable in MSYS causing which
45154    # to not find them
45155    if test "x$new_path" = x \
45156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45158      new_path="$path"
45159
45160  windows_path="$new_path"
45161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45162    unix_path=`$CYGPATH -u "$windows_path"`
45163    new_path="$unix_path"
45164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45166    new_path="$unix_path"
45167  fi
45168
45169    fi
45170
45171    if test "x$new_path" = x; then
45172      # It's still not found. Now this is an unrecoverable error.
45173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45174$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45175      has_space=`$ECHO "$complete" | $GREP " "`
45176      if test "x$has_space" != x; then
45177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45179      fi
45180      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45181    fi
45182  fi
45183
45184  # Now new_path has a complete unix path to the binary
45185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45186    # Keep paths in /bin as-is, but remove trailing .exe if any
45187    new_path="${new_path/%.exe/}"
45188    # Do not save /bin paths to all_fixpath_prefixes!
45189  else
45190    # Not in mixed or Windows style, start by that.
45191    new_path=`cmd //c echo $new_path`
45192
45193  input_path="$new_path"
45194  # Check if we need to convert this using DOS-style short mode. If the path
45195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45196  # take no chances and rewrite it.
45197  # Note: m4 eats our [], so we need to use [ and ] instead.
45198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45199  if test "x$has_forbidden_chars" != x; then
45200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45202  fi
45203
45204    # Output is in $new_path
45205
45206  windows_path="$new_path"
45207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45208    unix_path=`$CYGPATH -u "$windows_path"`
45209    new_path="$unix_path"
45210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45212    new_path="$unix_path"
45213  fi
45214
45215    # remove trailing .exe if any
45216    new_path="${new_path/%.exe/}"
45217
45218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45220  fi
45221
45222    else
45223      # We're on a unix platform. Hooray! :)
45224      # First separate the path from the arguments. This will split at the first
45225      # space.
45226      complete="$BUILD_AR"
45227      path="${complete%% *}"
45228      tmp="$complete EOL"
45229      arguments="${tmp#* }"
45230
45231      # Cannot rely on the command "which" here since it doesn't always work.
45232      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45233      if test -z "$is_absolute_path"; then
45234        # Path to executable is not absolute. Find it.
45235        IFS_save="$IFS"
45236        IFS=:
45237        for p in $PATH; do
45238          if test -f "$p/$path" && test -x "$p/$path"; then
45239            new_path="$p/$path"
45240            break
45241          fi
45242        done
45243        IFS="$IFS_save"
45244      else
45245        # This is an absolute path, we can use it without further modifications.
45246        new_path="$path"
45247      fi
45248
45249      if test "x$new_path" = x; then
45250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45251$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45252        has_space=`$ECHO "$complete" | $GREP " "`
45253        if test "x$has_space" != x; then
45254          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45255$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45256        fi
45257        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45258      fi
45259    fi
45260
45261    # Now join together the path and the arguments once again
45262    if test "x$arguments" != xEOL; then
45263      new_complete="$new_path ${arguments% *}"
45264    else
45265      new_complete="$new_path"
45266    fi
45267
45268    if test "x$complete" != "x$new_complete"; then
45269      BUILD_AR="$new_complete"
45270      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45271$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45272    fi
45273  fi
45274
45275    # Assume the C compiler is the assembler
45276    BUILD_AS="$BUILD_CC -c"
45277    # Just like for the target compiler, use the compiler as linker
45278    BUILD_LD="$BUILD_CC"
45279    BUILD_LDCXX="$BUILD_CXX"
45280
45281    PATH="$OLDPATH"
45282  else
45283    # If we are not cross compiling, use the normal target compilers for
45284    # building the build platform executables.
45285    BUILD_CC="$CC"
45286    BUILD_CXX="$CXX"
45287    BUILD_LD="$LD"
45288    BUILD_LDCXX="$LDCXX"
45289    BUILD_NM="$NM"
45290    BUILD_AS="$AS"
45291    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45292    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45293    BUILD_AR="$AR"
45294  fi
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45308    # For hotspot, we need these in Windows mixed path,
45309    # so rewrite them all. Need added .exe suffix.
45310    HOTSPOT_CXX="$CXX.exe"
45311    HOTSPOT_LD="$LD.exe"
45312    HOTSPOT_MT="$MT.exe"
45313    HOTSPOT_RC="$RC.exe"
45314
45315  unix_path="$HOTSPOT_CXX"
45316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45317    windows_path=`$CYGPATH -m "$unix_path"`
45318    HOTSPOT_CXX="$windows_path"
45319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45320    windows_path=`cmd //c echo $unix_path`
45321    HOTSPOT_CXX="$windows_path"
45322  fi
45323
45324
45325  unix_path="$HOTSPOT_LD"
45326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45327    windows_path=`$CYGPATH -m "$unix_path"`
45328    HOTSPOT_LD="$windows_path"
45329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45330    windows_path=`cmd //c echo $unix_path`
45331    HOTSPOT_LD="$windows_path"
45332  fi
45333
45334
45335  unix_path="$HOTSPOT_MT"
45336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337    windows_path=`$CYGPATH -m "$unix_path"`
45338    HOTSPOT_MT="$windows_path"
45339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340    windows_path=`cmd //c echo $unix_path`
45341    HOTSPOT_MT="$windows_path"
45342  fi
45343
45344
45345  unix_path="$HOTSPOT_RC"
45346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45347    windows_path=`$CYGPATH -m "$unix_path"`
45348    HOTSPOT_RC="$windows_path"
45349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45350    windows_path=`cmd //c echo $unix_path`
45351    HOTSPOT_RC="$windows_path"
45352  fi
45353
45354
45355
45356  else
45357    HOTSPOT_CXX="$CXX"
45358    HOTSPOT_LD="$LD"
45359  fi
45360
45361
45362
45363  if test  "x$TOOLCHAIN_TYPE" = xclang; then
45364    USE_CLANG=true
45365  fi
45366
45367
45368
45369
45370
45371  # The package path is used only on macosx?
45372  # FIXME: clean this up, and/or move it elsewhere.
45373  PACKAGE_PATH=/opt/local
45374
45375
45376  # Check for extra potential brokenness.
45377  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45378    # On Windows, double-check that we got the right compiler.
45379    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45380    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45381    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45382      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45383        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
45384      fi
45385    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45386      if test "x$COMPILER_CPU_TEST" != "xx64"; then
45387        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45388      fi
45389    fi
45390  fi
45391
45392  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45393    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45394    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45395    # This is later checked when setting flags.
45396
45397    # "-Og" suppported for GCC 4.8 and later
45398    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436
45437
45438
45439
45440
45441
45442
45443
45444
45445
45446    # Execute function body
45447
45448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45449$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45450  supports=yes
45451
45452  saved_cflags="$CFLAGS"
45453  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45454  ac_ext=c
45455ac_cpp='$CPP $CPPFLAGS'
45456ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45457ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45458ac_compiler_gnu=$ac_cv_c_compiler_gnu
45459
45460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45461/* end confdefs.h.  */
45462int i;
45463_ACEOF
45464if ac_fn_c_try_compile "$LINENO"; then :
45465
45466else
45467  supports=no
45468fi
45469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45470  ac_ext=cpp
45471ac_cpp='$CXXCPP $CPPFLAGS'
45472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45475
45476  CFLAGS="$saved_cflags"
45477
45478  saved_cxxflags="$CXXFLAGS"
45479  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45480  ac_ext=cpp
45481ac_cpp='$CXXCPP $CPPFLAGS'
45482ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45483ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45484ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45485
45486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45487/* end confdefs.h.  */
45488int i;
45489_ACEOF
45490if ac_fn_cxx_try_compile "$LINENO"; then :
45491
45492else
45493  supports=no
45494fi
45495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45496  ac_ext=cpp
45497ac_cpp='$CXXCPP $CPPFLAGS'
45498ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45499ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45500ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45501
45502  CXXFLAGS="$saved_cxxflags"
45503
45504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45505$as_echo "$supports" >&6; }
45506  if test "x$supports" = "xyes" ; then
45507    :
45508    HAS_CFLAG_OPTIMIZE_DEBUG=true
45509  else
45510    :
45511    HAS_CFLAG_OPTIMIZE_DEBUG=false
45512  fi
45513
45514
45515
45516
45517
45518
45519
45520
45521
45522
45523
45524
45525
45526    # "-z relro" supported in GNU binutils 2.17 and later
45527    LINKER_RELRO_FLAG="-Wl,-z,relro"
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
45538
45539
45540
45541
45542
45543
45544
45545
45546
45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
45560
45561
45562
45563
45564
45565
45566
45567
45568
45569
45570
45571
45572
45573
45574
45575    # Execute function body
45576
45577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45578$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45579  supports=yes
45580
45581  saved_ldflags="$LDFLAGS"
45582  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45583  ac_ext=c
45584ac_cpp='$CPP $CPPFLAGS'
45585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45587ac_compiler_gnu=$ac_cv_c_compiler_gnu
45588
45589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45590/* end confdefs.h.  */
45591
45592int
45593main ()
45594{
45595
45596  ;
45597  return 0;
45598}
45599_ACEOF
45600if ac_fn_c_try_link "$LINENO"; then :
45601
45602else
45603  supports=no
45604fi
45605rm -f core conftest.err conftest.$ac_objext \
45606    conftest$ac_exeext conftest.$ac_ext
45607  ac_ext=cpp
45608ac_cpp='$CXXCPP $CPPFLAGS'
45609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45612
45613  LDFLAGS="$saved_ldflags"
45614
45615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45616$as_echo "$supports" >&6; }
45617  if test "x$supports" = "xyes" ; then
45618    :
45619    HAS_LINKER_RELRO=true
45620  else
45621    :
45622    HAS_LINKER_RELRO=false
45623  fi
45624
45625
45626
45627
45628
45629
45630
45631
45632
45633
45634
45635
45636
45637    # "-z now" supported in GNU binutils 2.11 and later
45638    LINKER_NOW_FLAG="-Wl,-z,now"
45639
45640
45641
45642
45643
45644
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654
45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686    # Execute function body
45687
45688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45689$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45690  supports=yes
45691
45692  saved_ldflags="$LDFLAGS"
45693  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45694  ac_ext=c
45695ac_cpp='$CPP $CPPFLAGS'
45696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45698ac_compiler_gnu=$ac_cv_c_compiler_gnu
45699
45700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45701/* end confdefs.h.  */
45702
45703int
45704main ()
45705{
45706
45707  ;
45708  return 0;
45709}
45710_ACEOF
45711if ac_fn_c_try_link "$LINENO"; then :
45712
45713else
45714  supports=no
45715fi
45716rm -f core conftest.err conftest.$ac_objext \
45717    conftest$ac_exeext conftest.$ac_ext
45718  ac_ext=cpp
45719ac_cpp='$CXXCPP $CPPFLAGS'
45720ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45721ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45722ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45723
45724  LDFLAGS="$saved_ldflags"
45725
45726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45727$as_echo "$supports" >&6; }
45728  if test "x$supports" = "xyes" ; then
45729    :
45730    HAS_LINKER_NOW=true
45731  else
45732    :
45733    HAS_LINKER_NOW=false
45734  fi
45735
45736
45737
45738
45739
45740
45741
45742
45743
45744
45745
45746
45747  fi
45748
45749  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45750  # in executable.'
45751  USING_BROKEN_SUSE_LD=no
45752  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45754$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45755    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45756    $ECHO "int main() { }" > main.c
45757    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
45758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45759$as_echo "no" >&6; }
45760      USING_BROKEN_SUSE_LD=no
45761    else
45762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45763$as_echo "yes" >&6; }
45764      USING_BROKEN_SUSE_LD=yes
45765    fi
45766    rm -rf version-script.map main.c a.out
45767  fi
45768
45769
45770
45771# Setup the JTReg Regression Test Harness.
45772
45773
45774# Check whether --with-jtreg was given.
45775if test "${with_jtreg+set}" = set; then :
45776  withval=$with_jtreg;
45777else
45778  with_jtreg=no
45779fi
45780
45781
45782  if test "x$with_jtreg" = xno; then
45783    # jtreg disabled
45784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45785$as_echo_n "checking for jtreg... " >&6; }
45786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45787$as_echo "no" >&6; }
45788  else
45789    if test "x$with_jtreg" != xyes; then
45790      # with path specified.
45791      JT_HOME="$with_jtreg"
45792    fi
45793
45794    if test "x$JT_HOME" != x; then
45795      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45796$as_echo_n "checking for jtreg... " >&6; }
45797
45798      # use JT_HOME enviroment var.
45799
45800  # Only process if variable expands to non-empty
45801
45802  if test "x$JT_HOME" != x; then
45803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45804
45805  # Input might be given as Windows format, start by converting to
45806  # unix format.
45807  path="$JT_HOME"
45808  new_path=`$CYGPATH -u "$path"`
45809
45810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45813  # "foo.exe" is OK but "foo" is an error.
45814  #
45815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45816  # It is also a way to make sure we got the proper file name for the real test later on.
45817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45818  if test "x$test_shortpath" = x; then
45819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45820$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45821    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45822  fi
45823
45824  # Call helper function which possibly converts this using DOS-style short mode.
45825  # If so, the updated path is stored in $new_path.
45826
45827  input_path="$new_path"
45828  # Check if we need to convert this using DOS-style short mode. If the path
45829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45830  # take no chances and rewrite it.
45831  # Note: m4 eats our [], so we need to use [ and ] instead.
45832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45833  if test "x$has_forbidden_chars" != x; then
45834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45838      # Going to short mode and back again did indeed matter. Since short mode is
45839      # case insensitive, let's make it lowercase to improve readability.
45840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45841      # Now convert it back to Unix-style (cygpath)
45842      input_path=`$CYGPATH -u "$shortmode_path"`
45843      new_path="$input_path"
45844    fi
45845  fi
45846
45847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45848  if test "x$test_cygdrive_prefix" = x; then
45849    # As a simple fix, exclude /usr/bin since it's not a real path.
45850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45852      # a path prefixed by /cygdrive for fixpath to work.
45853      new_path="$CYGWIN_ROOT_PATH$input_path"
45854    fi
45855  fi
45856
45857
45858  if test "x$path" != "x$new_path"; then
45859    JT_HOME="$new_path"
45860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45861$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45862  fi
45863
45864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45865
45866  path="$JT_HOME"
45867  has_colon=`$ECHO $path | $GREP ^.:`
45868  new_path="$path"
45869  if test "x$has_colon" = x; then
45870    # Not in mixed or Windows style, start by that.
45871    new_path=`cmd //c echo $path`
45872  fi
45873
45874
45875  input_path="$new_path"
45876  # Check if we need to convert this using DOS-style short mode. If the path
45877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45878  # take no chances and rewrite it.
45879  # Note: m4 eats our [], so we need to use [ and ] instead.
45880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45881  if test "x$has_forbidden_chars" != x; then
45882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45884  fi
45885
45886
45887  windows_path="$new_path"
45888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45889    unix_path=`$CYGPATH -u "$windows_path"`
45890    new_path="$unix_path"
45891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45893    new_path="$unix_path"
45894  fi
45895
45896  if test "x$path" != "x$new_path"; then
45897    JT_HOME="$new_path"
45898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45899$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45900  fi
45901
45902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45904
45905    else
45906      # We're on a unix platform. Hooray! :)
45907      path="$JT_HOME"
45908      has_space=`$ECHO "$path" | $GREP " "`
45909      if test "x$has_space" != x; then
45910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45911$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45913      fi
45914
45915      # Use eval to expand a potential ~
45916      eval path="$path"
45917      if test ! -f "$path" && test ! -d "$path"; then
45918        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45919      fi
45920
45921      if test -d "$path"; then
45922        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45923      else
45924        dir="`$DIRNAME "$path"`"
45925        base="`$BASENAME "$path"`"
45926        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45927      fi
45928    fi
45929  fi
45930
45931
45932      # jtreg win32 script works for everybody
45933      JTREGEXE="$JT_HOME/bin/jtreg"
45934
45935      if test ! -f "$JTREGEXE"; then
45936        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45937      fi
45938
45939      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45940$as_echo "$JTREGEXE" >&6; }
45941    else
45942      # try to find jtreg on path
45943
45944
45945
45946  # Publish this variable in the help.
45947
45948
45949  if [ -z "${JTREGEXE+x}" ]; then
45950    # The variable is not set by user, try to locate tool using the code snippet
45951    for ac_prog in jtreg
45952do
45953  # Extract the first word of "$ac_prog", so it can be a program name with args.
45954set dummy $ac_prog; ac_word=$2
45955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45956$as_echo_n "checking for $ac_word... " >&6; }
45957if ${ac_cv_path_JTREGEXE+:} false; then :
45958  $as_echo_n "(cached) " >&6
45959else
45960  case $JTREGEXE in
45961  [\\/]* | ?:[\\/]*)
45962  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45963  ;;
45964  *)
45965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45966for as_dir in $PATH
45967do
45968  IFS=$as_save_IFS
45969  test -z "$as_dir" && as_dir=.
45970    for ac_exec_ext in '' $ac_executable_extensions; do
45971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45972    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45974    break 2
45975  fi
45976done
45977  done
45978IFS=$as_save_IFS
45979
45980  ;;
45981esac
45982fi
45983JTREGEXE=$ac_cv_path_JTREGEXE
45984if test -n "$JTREGEXE"; then
45985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45986$as_echo "$JTREGEXE" >&6; }
45987else
45988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45989$as_echo "no" >&6; }
45990fi
45991
45992
45993  test -n "$JTREGEXE" && break
45994done
45995
45996  else
45997    # The variable is set, but is it from the command line or the environment?
45998
45999    # Try to remove the string !JTREGEXE! from our list.
46000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
46001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46002      # If it failed, the variable was not from the command line. Ignore it,
46003      # but warn the user (except for BASH, which is always set by the calling BASH).
46004      if test "xJTREGEXE" != xBASH; then
46005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
46006$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
46007      fi
46008      # Try to locate tool using the code snippet
46009      for ac_prog in jtreg
46010do
46011  # Extract the first word of "$ac_prog", so it can be a program name with args.
46012set dummy $ac_prog; ac_word=$2
46013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46014$as_echo_n "checking for $ac_word... " >&6; }
46015if ${ac_cv_path_JTREGEXE+:} false; then :
46016  $as_echo_n "(cached) " >&6
46017else
46018  case $JTREGEXE in
46019  [\\/]* | ?:[\\/]*)
46020  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46021  ;;
46022  *)
46023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46024for as_dir in $PATH
46025do
46026  IFS=$as_save_IFS
46027  test -z "$as_dir" && as_dir=.
46028    for ac_exec_ext in '' $ac_executable_extensions; do
46029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46030    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46032    break 2
46033  fi
46034done
46035  done
46036IFS=$as_save_IFS
46037
46038  ;;
46039esac
46040fi
46041JTREGEXE=$ac_cv_path_JTREGEXE
46042if test -n "$JTREGEXE"; then
46043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46044$as_echo "$JTREGEXE" >&6; }
46045else
46046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46047$as_echo "no" >&6; }
46048fi
46049
46050
46051  test -n "$JTREGEXE" && break
46052done
46053
46054    else
46055      # If it succeeded, then it was overridden by the user. We will use it
46056      # for the tool.
46057
46058      # First remove it from the list of overridden variables, so we can test
46059      # for unknown variables in the end.
46060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46061
46062      # Check if we try to supply an empty value
46063      if test "x$JTREGEXE" = x; then
46064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
46065$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
46066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46067$as_echo_n "checking for JTREGEXE... " >&6; }
46068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46069$as_echo "disabled" >&6; }
46070      else
46071        # Check if the provided tool contains a complete path.
46072        tool_specified="$JTREGEXE"
46073        tool_basename="${tool_specified##*/}"
46074        if test "x$tool_basename" = "x$tool_specified"; then
46075          # A command without a complete path is provided, search $PATH.
46076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
46077$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
46078          # Extract the first word of "$tool_basename", so it can be a program name with args.
46079set dummy $tool_basename; ac_word=$2
46080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46081$as_echo_n "checking for $ac_word... " >&6; }
46082if ${ac_cv_path_JTREGEXE+:} false; then :
46083  $as_echo_n "(cached) " >&6
46084else
46085  case $JTREGEXE in
46086  [\\/]* | ?:[\\/]*)
46087  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
46088  ;;
46089  *)
46090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46091for as_dir in $PATH
46092do
46093  IFS=$as_save_IFS
46094  test -z "$as_dir" && as_dir=.
46095    for ac_exec_ext in '' $ac_executable_extensions; do
46096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46097    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
46098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46099    break 2
46100  fi
46101done
46102  done
46103IFS=$as_save_IFS
46104
46105  ;;
46106esac
46107fi
46108JTREGEXE=$ac_cv_path_JTREGEXE
46109if test -n "$JTREGEXE"; then
46110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
46111$as_echo "$JTREGEXE" >&6; }
46112else
46113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46114$as_echo "no" >&6; }
46115fi
46116
46117
46118          if test "x$JTREGEXE" = x; then
46119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46120          fi
46121        else
46122          # Otherwise we believe it is a complete path. Use it as it is.
46123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
46124$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
46125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
46126$as_echo_n "checking for JTREGEXE... " >&6; }
46127          if test ! -x "$tool_specified"; then
46128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46129$as_echo "not found" >&6; }
46130            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
46131          fi
46132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46133$as_echo "$tool_specified" >&6; }
46134        fi
46135      fi
46136    fi
46137
46138  fi
46139
46140
46141
46142  if test "x$JTREGEXE" = x; then
46143    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
46144  fi
46145
46146
46147      JT_HOME="`$DIRNAME $JTREGEXE`"
46148    fi
46149  fi
46150
46151
46152
46153
46154
46155
46156  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
46157  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
46158  if test "x$TOOLCHAIN_TYPE" = xxlc; then
46159    COMPILER_TARGET_BITS_FLAG="-q"
46160    COMPILER_COMMAND_FILE_FLAG="-f"
46161  else
46162    COMPILER_TARGET_BITS_FLAG="-m"
46163    COMPILER_COMMAND_FILE_FLAG="@"
46164
46165    # The solstudio linker does not support @-files.
46166    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46167      COMPILER_COMMAND_FILE_FLAG=
46168    fi
46169
46170    # Check if @file is supported by gcc
46171    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
46173$as_echo_n "checking if @file is supported by gcc... " >&6; }
46174      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
46175      $ECHO "" "--version" > command.file
46176      if $CXX @command.file 2>&5 >&5; then
46177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46178$as_echo "yes" >&6; }
46179        COMPILER_COMMAND_FILE_FLAG="@"
46180      else
46181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46182$as_echo "no" >&6; }
46183        COMPILER_COMMAND_FILE_FLAG=
46184      fi
46185      rm -rf command.file
46186    fi
46187  fi
46188
46189
46190
46191  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
46192  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46193    ARFLAGS="-r"
46194  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46195    ARFLAGS="-X64"
46196  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
46197    # lib.exe is used as AR to create static libraries.
46198    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
46199  else
46200    ARFLAGS=""
46201  fi
46202
46203
46204  ## Setup strip.
46205  # FIXME: should this really be per platform, or should it be per toolchain type?
46206  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
46207  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
46208  if test "x$OPENJDK_TARGET_OS" = xlinux; then
46209    STRIPFLAGS="-g"
46210  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
46211    STRIPFLAGS="-x"
46212  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
46213    STRIPFLAGS="-S"
46214  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46215    STRIPFLAGS="-X32_64"
46216  fi
46217
46218
46219
46220  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46221    CC_OUT_OPTION=-Fo
46222    EXE_OUT_OPTION=-out:
46223    LD_OUT_OPTION=-out:
46224    AR_OUT_OPTION=-out:
46225  else
46226    # The option used to specify the target .o,.a or .so file.
46227    # When compiling, how to specify the to be created object file.
46228    CC_OUT_OPTION='-o$(SPACE)'
46229    # When linking, how to specify the to be created executable.
46230    EXE_OUT_OPTION='-o$(SPACE)'
46231    # When linking, how to specify the to be created dynamically linkable library.
46232    LD_OUT_OPTION='-o$(SPACE)'
46233    # When archiving, how to specify the to be create static archive for object files.
46234    AR_OUT_OPTION='rcs$(SPACE)'
46235  fi
46236
46237
46238
46239
46240
46241  # On Windows, we need to set RC flags.
46242  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46243    RC_FLAGS="-nologo -l0x409"
46244    if test "x$VARIANT" = xOPT; then
46245      RC_FLAGS="$RC_FLAGS -DNDEBUG"
46246    fi
46247
46248    # The version variables used to create RC_FLAGS may be overridden
46249    # in a custom configure script, or possibly the command line.
46250    # Let those variables be expanded at make time in spec.gmk.
46251    # The \$ are escaped to the shell, and the $(...) variables
46252    # are evaluated by make.
46253    RC_FLAGS="$RC_FLAGS \
46254        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
46255        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
46256        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
46257        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
46258        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
46259        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
46260        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
46261  fi
46262
46263
46264  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46265    # silence copyright notice and other headers.
46266    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
46267  fi
46268
46269
46270# FIXME: Currently we must test this after toolchain but before flags. Fix!
46271
46272# Now we can test some aspects on the target using configure macros.
46273
46274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
46275$as_echo_n "checking for ANSI C header files... " >&6; }
46276if ${ac_cv_header_stdc+:} false; then :
46277  $as_echo_n "(cached) " >&6
46278else
46279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46280/* end confdefs.h.  */
46281#include <stdlib.h>
46282#include <stdarg.h>
46283#include <string.h>
46284#include <float.h>
46285
46286int
46287main ()
46288{
46289
46290  ;
46291  return 0;
46292}
46293_ACEOF
46294if ac_fn_cxx_try_compile "$LINENO"; then :
46295  ac_cv_header_stdc=yes
46296else
46297  ac_cv_header_stdc=no
46298fi
46299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46300
46301if test $ac_cv_header_stdc = yes; then
46302  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
46303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46304/* end confdefs.h.  */
46305#include <string.h>
46306
46307_ACEOF
46308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46309  $EGREP "memchr" >/dev/null 2>&1; then :
46310
46311else
46312  ac_cv_header_stdc=no
46313fi
46314rm -f conftest*
46315
46316fi
46317
46318if test $ac_cv_header_stdc = yes; then
46319  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
46320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46321/* end confdefs.h.  */
46322#include <stdlib.h>
46323
46324_ACEOF
46325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46326  $EGREP "free" >/dev/null 2>&1; then :
46327
46328else
46329  ac_cv_header_stdc=no
46330fi
46331rm -f conftest*
46332
46333fi
46334
46335if test $ac_cv_header_stdc = yes; then
46336  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
46337  if test "$cross_compiling" = yes; then :
46338  :
46339else
46340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46341/* end confdefs.h.  */
46342#include <ctype.h>
46343#include <stdlib.h>
46344#if ((' ' & 0x0FF) == 0x020)
46345# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
46346# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
46347#else
46348# define ISLOWER(c) \
46349		   (('a' <= (c) && (c) <= 'i') \
46350		     || ('j' <= (c) && (c) <= 'r') \
46351		     || ('s' <= (c) && (c) <= 'z'))
46352# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
46353#endif
46354
46355#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
46356int
46357main ()
46358{
46359  int i;
46360  for (i = 0; i < 256; i++)
46361    if (XOR (islower (i), ISLOWER (i))
46362	|| toupper (i) != TOUPPER (i))
46363      return 2;
46364  return 0;
46365}
46366_ACEOF
46367if ac_fn_cxx_try_run "$LINENO"; then :
46368
46369else
46370  ac_cv_header_stdc=no
46371fi
46372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46373  conftest.$ac_objext conftest.beam conftest.$ac_ext
46374fi
46375
46376fi
46377fi
46378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
46379$as_echo "$ac_cv_header_stdc" >&6; }
46380if test $ac_cv_header_stdc = yes; then
46381
46382$as_echo "#define STDC_HEADERS 1" >>confdefs.h
46383
46384fi
46385
46386# On IRIX 5.3, sys/types and inttypes.h are conflicting.
46387for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
46388		  inttypes.h stdint.h unistd.h
46389do :
46390  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
46391ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
46392"
46393if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
46394  cat >>confdefs.h <<_ACEOF
46395#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
46396_ACEOF
46397
46398fi
46399
46400done
46401
46402
46403
46404  ###############################################################################
46405  #
46406  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
46407  # (The JVM can use 32 or 64 bit Java pointers but that decision
46408  # is made at runtime.)
46409  #
46410
46411  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
46412    # Always specify -m flag on Solaris
46413    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
46414
46415  # When we add flags to the "official" CFLAGS etc, we need to
46416  # keep track of these additions in ADDED_CFLAGS etc. These
46417  # will later be checked to make sure only controlled additions
46418  # have been made to CFLAGS etc.
46419  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46420  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46421  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46422
46423  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46424  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46425  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46426
46427  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46428  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46429  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46430
46431  elif test "x$COMPILE_TYPE" = xreduced; then
46432    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
46433      # Specify -m if running reduced on unix platforms
46434
46435  # When we add flags to the "official" CFLAGS etc, we need to
46436  # keep track of these additions in ADDED_CFLAGS etc. These
46437  # will later be checked to make sure only controlled additions
46438  # have been made to CFLAGS etc.
46439  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46440  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46441  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46442
46443  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46444  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46445  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46446
46447  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46448  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46449  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46450
46451    fi
46452  fi
46453
46454  # Make compilation sanity check
46455  for ac_header in stdio.h
46456do :
46457  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
46458if test "x$ac_cv_header_stdio_h" = xyes; then :
46459  cat >>confdefs.h <<_ACEOF
46460#define HAVE_STDIO_H 1
46461_ACEOF
46462
46463else
46464
46465    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
46466$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
46467    if test "x$COMPILE_TYPE" = xreduced; then
46468
46469  # Print a helpful message on how to acquire the necessary build dependency.
46470  # reduced is the help tag: freetype, cups, alsa etc
46471  MISSING_DEPENDENCY=reduced
46472
46473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46474    cygwin_help $MISSING_DEPENDENCY
46475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46476    msys_help $MISSING_DEPENDENCY
46477  else
46478    PKGHANDLER_COMMAND=
46479
46480    case $PKGHANDLER in
46481      apt-get)
46482        apt_help     $MISSING_DEPENDENCY ;;
46483      yum)
46484        yum_help     $MISSING_DEPENDENCY ;;
46485      port)
46486        port_help    $MISSING_DEPENDENCY ;;
46487      pkgutil)
46488        pkgutil_help $MISSING_DEPENDENCY ;;
46489      pkgadd)
46490        pkgadd_help  $MISSING_DEPENDENCY ;;
46491    esac
46492
46493    if test "x$PKGHANDLER_COMMAND" != x; then
46494      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46495    fi
46496  fi
46497
46498      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46499$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46500    elif test "x$COMPILE_TYPE" = xcross; then
46501      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46502$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46503    fi
46504    as_fn_error $? "Cannot continue." "$LINENO" 5
46505
46506fi
46507
46508done
46509
46510
46511  # The cast to long int works around a bug in the HP C Compiler
46512# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46513# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46514# This bug is HP SR number 8606223364.
46515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46516$as_echo_n "checking size of int *... " >&6; }
46517if ${ac_cv_sizeof_int_p+:} false; then :
46518  $as_echo_n "(cached) " >&6
46519else
46520  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46521
46522else
46523  if test "$ac_cv_type_int_p" = yes; then
46524     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46526as_fn_error 77 "cannot compute sizeof (int *)
46527See \`config.log' for more details" "$LINENO" 5; }
46528   else
46529     ac_cv_sizeof_int_p=0
46530   fi
46531fi
46532
46533fi
46534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46535$as_echo "$ac_cv_sizeof_int_p" >&6; }
46536
46537
46538
46539cat >>confdefs.h <<_ACEOF
46540#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46541_ACEOF
46542
46543
46544
46545  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46546  if test "x$ac_cv_sizeof_int_p" = x; then
46547    # The test failed, lets stick to the assumed value.
46548    { $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
46549$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46550  else
46551    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46552
46553    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46554      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46555      # Let's try to implicitely set the compilers target architecture and retry the test
46556      { $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
46557$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;}
46558      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46559$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46560
46561  # When we add flags to the "official" CFLAGS etc, we need to
46562  # keep track of these additions in ADDED_CFLAGS etc. These
46563  # will later be checked to make sure only controlled additions
46564  # have been made to CFLAGS etc.
46565  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46566  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46567  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46568
46569  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46570  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46571  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46572
46573  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46574  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46575  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46576
46577
46578      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46579      unset ac_cv_sizeof_int_p
46580      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46581      cat >>confdefs.h <<_ACEOF
46582#undef SIZEOF_INT_P
46583_ACEOF
46584
46585      # The cast to long int works around a bug in the HP C Compiler
46586# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46587# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46588# This bug is HP SR number 8606223364.
46589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46590$as_echo_n "checking size of int *... " >&6; }
46591if ${ac_cv_sizeof_int_p+:} false; then :
46592  $as_echo_n "(cached) " >&6
46593else
46594  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46595
46596else
46597  if test "$ac_cv_type_int_p" = yes; then
46598     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46600as_fn_error 77 "cannot compute sizeof (int *)
46601See \`config.log' for more details" "$LINENO" 5; }
46602   else
46603     ac_cv_sizeof_int_p=0
46604   fi
46605fi
46606
46607fi
46608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46609$as_echo "$ac_cv_sizeof_int_p" >&6; }
46610
46611
46612
46613cat >>confdefs.h <<_ACEOF
46614#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46615_ACEOF
46616
46617
46618
46619      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46620
46621      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46622        { $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
46623$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;}
46624        if test "x$COMPILE_TYPE" = xreduced; then
46625
46626  # Print a helpful message on how to acquire the necessary build dependency.
46627  # reduced is the help tag: freetype, cups, alsa etc
46628  MISSING_DEPENDENCY=reduced
46629
46630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46631    cygwin_help $MISSING_DEPENDENCY
46632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46633    msys_help $MISSING_DEPENDENCY
46634  else
46635    PKGHANDLER_COMMAND=
46636
46637    case $PKGHANDLER in
46638      apt-get)
46639        apt_help     $MISSING_DEPENDENCY ;;
46640      yum)
46641        yum_help     $MISSING_DEPENDENCY ;;
46642      port)
46643        port_help    $MISSING_DEPENDENCY ;;
46644      pkgutil)
46645        pkgutil_help $MISSING_DEPENDENCY ;;
46646      pkgadd)
46647        pkgadd_help  $MISSING_DEPENDENCY ;;
46648    esac
46649
46650    if test "x$PKGHANDLER_COMMAND" != x; then
46651      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46652    fi
46653  fi
46654
46655          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46656$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46657        elif test "x$COMPILE_TYPE" = xcross; then
46658          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46659$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46660        fi
46661        as_fn_error $? "Cannot continue." "$LINENO" 5
46662      fi
46663    fi
46664  fi
46665
46666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46667$as_echo_n "checking for target address size... " >&6; }
46668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46669$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46670
46671
46672  ###############################################################################
46673  #
46674  # Is the target little of big endian?
46675  #
46676   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46677$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46678if ${ac_cv_c_bigendian+:} false; then :
46679  $as_echo_n "(cached) " >&6
46680else
46681  ac_cv_c_bigendian=unknown
46682    # See if we're dealing with a universal compiler.
46683    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46684/* end confdefs.h.  */
46685#ifndef __APPLE_CC__
46686	       not a universal capable compiler
46687	     #endif
46688	     typedef int dummy;
46689
46690_ACEOF
46691if ac_fn_cxx_try_compile "$LINENO"; then :
46692
46693	# Check for potential -arch flags.  It is not universal unless
46694	# there are at least two -arch flags with different values.
46695	ac_arch=
46696	ac_prev=
46697	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46698	 if test -n "$ac_prev"; then
46699	   case $ac_word in
46700	     i?86 | x86_64 | ppc | ppc64)
46701	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46702		 ac_arch=$ac_word
46703	       else
46704		 ac_cv_c_bigendian=universal
46705		 break
46706	       fi
46707	       ;;
46708	   esac
46709	   ac_prev=
46710	 elif test "x$ac_word" = "x-arch"; then
46711	   ac_prev=arch
46712	 fi
46713       done
46714fi
46715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46716    if test $ac_cv_c_bigendian = unknown; then
46717      # See if sys/param.h defines the BYTE_ORDER macro.
46718      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46719/* end confdefs.h.  */
46720#include <sys/types.h>
46721	     #include <sys/param.h>
46722
46723int
46724main ()
46725{
46726#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46727		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46728		     && LITTLE_ENDIAN)
46729	      bogus endian macros
46730	     #endif
46731
46732  ;
46733  return 0;
46734}
46735_ACEOF
46736if ac_fn_cxx_try_compile "$LINENO"; then :
46737  # It does; now see whether it defined to BIG_ENDIAN or not.
46738	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46739/* end confdefs.h.  */
46740#include <sys/types.h>
46741		#include <sys/param.h>
46742
46743int
46744main ()
46745{
46746#if BYTE_ORDER != BIG_ENDIAN
46747		 not big endian
46748		#endif
46749
46750  ;
46751  return 0;
46752}
46753_ACEOF
46754if ac_fn_cxx_try_compile "$LINENO"; then :
46755  ac_cv_c_bigendian=yes
46756else
46757  ac_cv_c_bigendian=no
46758fi
46759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46760fi
46761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46762    fi
46763    if test $ac_cv_c_bigendian = unknown; then
46764      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46765      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46766/* end confdefs.h.  */
46767#include <limits.h>
46768
46769int
46770main ()
46771{
46772#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46773	      bogus endian macros
46774	     #endif
46775
46776  ;
46777  return 0;
46778}
46779_ACEOF
46780if ac_fn_cxx_try_compile "$LINENO"; then :
46781  # It does; now see whether it defined to _BIG_ENDIAN or not.
46782	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46783/* end confdefs.h.  */
46784#include <limits.h>
46785
46786int
46787main ()
46788{
46789#ifndef _BIG_ENDIAN
46790		 not big endian
46791		#endif
46792
46793  ;
46794  return 0;
46795}
46796_ACEOF
46797if ac_fn_cxx_try_compile "$LINENO"; then :
46798  ac_cv_c_bigendian=yes
46799else
46800  ac_cv_c_bigendian=no
46801fi
46802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46803fi
46804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46805    fi
46806    if test $ac_cv_c_bigendian = unknown; then
46807      # Compile a test program.
46808      if test "$cross_compiling" = yes; then :
46809  # Try to guess by grepping values from an object file.
46810	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46811/* end confdefs.h.  */
46812short int ascii_mm[] =
46813		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46814		short int ascii_ii[] =
46815		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46816		int use_ascii (int i) {
46817		  return ascii_mm[i] + ascii_ii[i];
46818		}
46819		short int ebcdic_ii[] =
46820		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46821		short int ebcdic_mm[] =
46822		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46823		int use_ebcdic (int i) {
46824		  return ebcdic_mm[i] + ebcdic_ii[i];
46825		}
46826		extern int foo;
46827
46828int
46829main ()
46830{
46831return use_ascii (foo) == use_ebcdic (foo);
46832  ;
46833  return 0;
46834}
46835_ACEOF
46836if ac_fn_cxx_try_compile "$LINENO"; then :
46837  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46838	      ac_cv_c_bigendian=yes
46839	    fi
46840	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46841	      if test "$ac_cv_c_bigendian" = unknown; then
46842		ac_cv_c_bigendian=no
46843	      else
46844		# finding both strings is unlikely to happen, but who knows?
46845		ac_cv_c_bigendian=unknown
46846	      fi
46847	    fi
46848fi
46849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46850else
46851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46852/* end confdefs.h.  */
46853$ac_includes_default
46854int
46855main ()
46856{
46857
46858	     /* Are we little or big endian?  From Harbison&Steele.  */
46859	     union
46860	     {
46861	       long int l;
46862	       char c[sizeof (long int)];
46863	     } u;
46864	     u.l = 1;
46865	     return u.c[sizeof (long int) - 1] == 1;
46866
46867  ;
46868  return 0;
46869}
46870_ACEOF
46871if ac_fn_cxx_try_run "$LINENO"; then :
46872  ac_cv_c_bigendian=no
46873else
46874  ac_cv_c_bigendian=yes
46875fi
46876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46877  conftest.$ac_objext conftest.beam conftest.$ac_ext
46878fi
46879
46880    fi
46881fi
46882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46883$as_echo "$ac_cv_c_bigendian" >&6; }
46884 case $ac_cv_c_bigendian in #(
46885   yes)
46886     ENDIAN="big";; #(
46887   no)
46888     ENDIAN="little" ;; #(
46889   universal)
46890     ENDIAN="universal_endianness"
46891     ;; #(
46892   *)
46893     ENDIAN="unknown" ;;
46894 esac
46895
46896
46897  if test "x$ENDIAN" = xuniversal_endianness; then
46898    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46899  fi
46900  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46901    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
46902  fi
46903
46904
46905# Configure flags for the tools
46906
46907  ###############################################################################
46908  #
46909  # How to compile shared libraries.
46910  #
46911
46912  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46913    PICFLAG="-fPIC"
46914    C_FLAG_REORDER=''
46915    CXX_FLAG_REORDER=''
46916
46917    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46918      # Linking is different on MacOSX
46919      if test "x$STATIC_BUILD" = xtrue; then
46920        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46921      else
46922        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46923      fi
46924      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46925      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46926      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46927      SET_SHARED_LIBRARY_MAPFILE=''
46928    else
46929      # Default works for linux, might work on other platforms as well.
46930      SHARED_LIBRARY_FLAGS='-shared'
46931      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46932      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46933      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46934      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46935    fi
46936  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46937    C_FLAG_REORDER=''
46938    CXX_FLAG_REORDER=''
46939
46940    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46941      # Linking is different on MacOSX
46942      PICFLAG=''
46943      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46944      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
46945      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46946      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
46947      SET_SHARED_LIBRARY_MAPFILE=''
46948    else
46949      # Default works for linux, might work on other platforms as well.
46950      PICFLAG='-fPIC'
46951      SHARED_LIBRARY_FLAGS='-shared'
46952      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
46953      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
46954      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
46955      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
46956    fi
46957  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46958    PICFLAG="-KPIC"
46959    C_FLAG_REORDER='-xF'
46960    CXX_FLAG_REORDER='-xF'
46961    SHARED_LIBRARY_FLAGS="-G"
46962    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46963    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46964    SET_SHARED_LIBRARY_NAME='-h $1'
46965    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46966  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46967    PICFLAG="-qpic=large"
46968    C_FLAG_REORDER=''
46969    CXX_FLAG_REORDER=''
46970    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46971    SET_EXECUTABLE_ORIGIN=""
46972    SET_SHARED_LIBRARY_ORIGIN=''
46973    SET_SHARED_LIBRARY_NAME=''
46974    SET_SHARED_LIBRARY_MAPFILE=''
46975  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46976    PICFLAG=""
46977    C_FLAG_REORDER=''
46978    CXX_FLAG_REORDER=''
46979    SHARED_LIBRARY_FLAGS="-dll"
46980    SET_EXECUTABLE_ORIGIN=''
46981    SET_SHARED_LIBRARY_ORIGIN=''
46982    SET_SHARED_LIBRARY_NAME=''
46983    SET_SHARED_LIBRARY_MAPFILE=''
46984  fi
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46995    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46996    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46997    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46998  fi
46999  # The (cross) compiler is now configured, we can now test capabilities
47000  # of the target platform.
47001
47002
47003
47004  ###############################################################################
47005  #
47006  # Setup the opt flags for different compilers
47007  # and different operating systems.
47008  #
47009
47010  # FIXME: this was indirectly the old default, but just inherited.
47011  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47012  #   C_FLAG_DEPS="-MMD -MF"
47013  # fi
47014
47015  # Generate make dependency files
47016  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47017    C_FLAG_DEPS="-MMD -MF"
47018  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47019    C_FLAG_DEPS="-MMD -MF"
47020  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47021    C_FLAG_DEPS="-xMMD -xMF"
47022  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47023    C_FLAG_DEPS="-qmakedep=gcc -MF"
47024  fi
47025  CXX_FLAG_DEPS="$C_FLAG_DEPS"
47026
47027
47028
47029  # Debug symbols
47030  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47031    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
47032      # reduce from default "-g2" option to save space
47033      CFLAGS_DEBUG_SYMBOLS="-g1"
47034      CXXFLAGS_DEBUG_SYMBOLS="-g1"
47035    else
47036      CFLAGS_DEBUG_SYMBOLS="-g"
47037      CXXFLAGS_DEBUG_SYMBOLS="-g"
47038    fi
47039  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47040    CFLAGS_DEBUG_SYMBOLS="-g"
47041    CXXFLAGS_DEBUG_SYMBOLS="-g"
47042  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47043    CFLAGS_DEBUG_SYMBOLS="-g -xs"
47044    # -g0 enables debug symbols without disabling inlining.
47045    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
47046  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47047    CFLAGS_DEBUG_SYMBOLS="-g"
47048    CXXFLAGS_DEBUG_SYMBOLS="-g"
47049  fi
47050
47051
47052
47053  # bounds, memory and behavior checking options
47054  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47055    case $DEBUG_LEVEL in
47056    release )
47057      # no adjustment
47058      ;;
47059    fastdebug )
47060      # no adjustment
47061      ;;
47062    slowdebug )
47063      # Add runtime stack smashing and undefined behavior checks.
47064      # Not all versions of gcc support -fstack-protector
47065      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100
47101
47102
47103
47104
47105
47106
47107
47108    # Execute function body
47109
47110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
47111$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
47112  supports=yes
47113
47114  saved_cflags="$CFLAGS"
47115  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
47116  ac_ext=c
47117ac_cpp='$CPP $CPPFLAGS'
47118ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47119ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47120ac_compiler_gnu=$ac_cv_c_compiler_gnu
47121
47122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47123/* end confdefs.h.  */
47124int i;
47125_ACEOF
47126if ac_fn_c_try_compile "$LINENO"; then :
47127
47128else
47129  supports=no
47130fi
47131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47132  ac_ext=cpp
47133ac_cpp='$CXXCPP $CPPFLAGS'
47134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47137
47138  CFLAGS="$saved_cflags"
47139
47140  saved_cxxflags="$CXXFLAGS"
47141  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
47142  ac_ext=cpp
47143ac_cpp='$CXXCPP $CPPFLAGS'
47144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47147
47148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47149/* end confdefs.h.  */
47150int i;
47151_ACEOF
47152if ac_fn_cxx_try_compile "$LINENO"; then :
47153
47154else
47155  supports=no
47156fi
47157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47158  ac_ext=cpp
47159ac_cpp='$CXXCPP $CPPFLAGS'
47160ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47161ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47162ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47163
47164  CXXFLAGS="$saved_cxxflags"
47165
47166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47167$as_echo "$supports" >&6; }
47168  if test "x$supports" = "xyes" ; then
47169    :
47170
47171  else
47172    :
47173    STACK_PROTECTOR_CFLAG=""
47174  fi
47175
47176
47177
47178
47179
47180
47181
47182
47183
47184
47185
47186
47187
47188      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
47189      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
47190      ;;
47191    esac
47192  fi
47193
47194  # Optimization levels
47195  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47196    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
47197
47198    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
47199      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
47200      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
47201      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
47202      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
47203      C_O_FLAG_DEBUG="-xregs=no%frameptr"
47204      C_O_FLAG_NONE="-xregs=no%frameptr"
47205      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
47206      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
47207      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
47208      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
47209      CXX_O_FLAG_NONE="-xregs=no%frameptr"
47210      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47211        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
47212        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
47213      fi
47214    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47215      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
47216      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
47217      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
47218      C_O_FLAG_DEBUG=""
47219      C_O_FLAG_NONE=""
47220      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
47221      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
47222      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
47223      C_O_FLAG_DEBUG=""
47224      CXX_O_FLAG_NONE=""
47225    fi
47226  else
47227    # The remaining toolchains share opt flags between CC and CXX;
47228    # setup for C and duplicate afterwards.
47229    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47230      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47231        # On MacOSX we optimize for size, something
47232        # we should do for all platforms?
47233        C_O_FLAG_HIGHEST="-Os"
47234        C_O_FLAG_HI="-Os"
47235        C_O_FLAG_NORM="-Os"
47236      else
47237        C_O_FLAG_HIGHEST="-O3"
47238        C_O_FLAG_HI="-O3"
47239        C_O_FLAG_NORM="-O2"
47240      fi
47241      C_O_FLAG_DEBUG="-O0"
47242      C_O_FLAG_NONE="-O0"
47243    elif test "x$TOOLCHAIN_TYPE" = xclang; then
47244      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47245        # On MacOSX we optimize for size, something
47246        # we should do for all platforms?
47247        C_O_FLAG_HIGHEST="-Os"
47248        C_O_FLAG_HI="-Os"
47249        C_O_FLAG_NORM="-Os"
47250      else
47251        C_O_FLAG_HIGHEST="-O3"
47252        C_O_FLAG_HI="-O3"
47253        C_O_FLAG_NORM="-O2"
47254      fi
47255      C_O_FLAG_DEBUG="-O0"
47256      C_O_FLAG_NONE="-O0"
47257    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47258      C_O_FLAG_HIGHEST="-O3"
47259      C_O_FLAG_HI="-O3 -qstrict"
47260      C_O_FLAG_NORM="-O2"
47261      C_O_FLAG_DEBUG="-qnoopt"
47262      C_O_FLAG_NONE="-qnoopt"
47263    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47264      C_O_FLAG_HIGHEST="-O2"
47265      C_O_FLAG_HI="-O1"
47266      C_O_FLAG_NORM="-O1"
47267      C_O_FLAG_DEBUG="-Od"
47268      C_O_FLAG_NONE="-Od"
47269    fi
47270    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
47271    CXX_O_FLAG_HI="$C_O_FLAG_HI"
47272    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
47273    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
47274    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
47275  fi
47276
47277  # Adjust optimization flags according to debug level.
47278  case $DEBUG_LEVEL in
47279    release )
47280      # no adjustment
47281      ;;
47282    fastdebug )
47283      # Not quite so much optimization
47284      C_O_FLAG_HI="$C_O_FLAG_NORM"
47285      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
47286      ;;
47287    slowdebug )
47288      # Disable optimization
47289      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
47290      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
47291      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
47292      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
47293      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
47294      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
47295      ;;
47296  esac
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310  # Special extras...
47311  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47312    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
47313      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47314      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
47315    fi
47316    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47317    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
47318  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47319    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47320    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
47321  fi
47322
47323  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
47324  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
47325  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
47326
47327  ###############################################################################
47328  #
47329  # Now setup the CFLAGS and LDFLAGS for the JDK build.
47330  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
47331  #
47332
47333  # Setup compiler/platform specific flags into
47334  #    CFLAGS_JDK    - C Compiler flags
47335  #    CXXFLAGS_JDK  - C++ Compiler flags
47336  #    COMMON_CCXXFLAGS_JDK - common to C and C++
47337  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47338    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47339      # Force compatibility with i586 on 32 bit intel platforms.
47340      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47341    fi
47342    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47343        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47344    case $OPENJDK_TARGET_CPU_ARCH in
47345      arm )
47346        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47347        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47348        ;;
47349      ppc )
47350        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47351        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47352        ;;
47353      * )
47354        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47355        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47356        ;;
47357    esac
47358  elif test "x$TOOLCHAIN_TYPE" = xclang; then
47359    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47360	    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47361	      # Force compatibility with i586 on 32 bit intel platforms.
47362	      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47363	    fi
47364	    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47365	        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47366	    case $OPENJDK_TARGET_CPU_ARCH in
47367	      ppc )
47368	        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47369	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47370	        ;;
47371	      * )
47372	        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47373	        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47374	        ;;
47375	    esac
47376    fi
47377  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47378    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47379    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47380      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47381    fi
47382
47383    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47384    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47385  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47386    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47387    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47388  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47389    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47390        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47391        -DWIN32_LEAN_AND_MEAN \
47392        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47393        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47394        -DWIN32 -DIAL"
47395    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47396      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47397    else
47398      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47399    fi
47400    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47401    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47402    # studio.
47403    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47404      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47405          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47406    fi
47407  fi
47408
47409  ###############################################################################
47410
47411  # Adjust flags according to debug level.
47412  case $DEBUG_LEVEL in
47413    fastdebug | slowdebug )
47414      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47415      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47416      JAVAC_FLAGS="$JAVAC_FLAGS -g"
47417      ;;
47418    release )
47419      ;;
47420    * )
47421      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47422      ;;
47423  esac
47424
47425  # Setup LP64
47426  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47427
47428  # Set some common defines. These works for all compilers, but assume
47429  # -D is universally accepted.
47430
47431  # Setup endianness
47432  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47433    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47434    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47435    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47436    #   Note: -Dmacro         is the same as    #define macro 1
47437    #         -Dmacro=        is the same as    #define macro
47438    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47439      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47440    else
47441      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47442    fi
47443  else
47444    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47445    # are defined in the system?
47446    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47447      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47448    else
47449      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47450    fi
47451  fi
47452
47453  # Setup target OS define. Use OS target name but in upper case.
47454  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47455  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47456
47457  # Setup target CPU
47458  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47459
47460  # Setup debug/release defines
47461  if test "x$DEBUG_LEVEL" = xrelease; then
47462    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47463    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47464      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47465    fi
47466  else
47467    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47468  fi
47469
47470  # Set some additional per-OS defines.
47471  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47472    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47473  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47474    # FIXME: PPC64 should not be here.
47475    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
47476  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47477    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47478  fi
47479
47480  # Additional macosx handling
47481  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47482    # Setting these parameters makes it an error to link to macosx APIs that are
47483    # newer than the given OS version and makes the linked binaries compatible
47484    # even if built on a newer version of the OS.
47485    # The expected format is X.Y.Z
47486    MACOSX_VERSION_MIN=10.7.0
47487
47488
47489    # The macro takes the version with no dots, ex: 1070
47490    # Let the flags variables get resolved in make for easier override on make
47491    # command line.
47492    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47493    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47494  fi
47495
47496  # Setup some hard coded includes
47497  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47498      -I${JDK_TOPDIR}/src/java.base/share/native/include \
47499      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47500      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47501      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47502      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47503
47504  # The shared libraries are compiled using the picflag.
47505  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47506  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47507
47508  # Executable flags
47509  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47510  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47511
47512
47513
47514
47515
47516
47517  # Flags for compiling test libraries
47518  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47519  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47520
47521  # Flags for compiling test executables
47522  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47523  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47524
47525
47526
47527
47528
47529
47530  # Setup LDFLAGS et al.
47531  #
47532
47533  # Now this is odd. The JDK native libraries have to link against libjvm.so
47534  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
47535  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
47536  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
47537  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
47538  # libraries will link to whatever is in memory. Yuck.
47539  #
47540  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
47541  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47542    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
47543    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47544      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
47545    fi
47546    # TODO: make -debug optional "--disable-full-debug-symbols"
47547    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
47548  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47549    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47550    # We have previously set HAS_GNU_HASH if this is the case
47551    if test -n "$HAS_GNU_HASH"; then
47552      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both"
47553    fi
47554    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47555      # And since we now know that the linker is gnu, then add -z defs, to forbid
47556      # undefined symbols in object files.
47557      LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs"
47558      case $DEBUG_LEVEL in
47559        release )
47560          # tell linker to optimize libraries.
47561          # Should this be supplied to the OSS linker as well?
47562          LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1"
47563          ;;
47564        slowdebug )
47565          if test "x$HAS_LINKER_NOW" = "xtrue"; then
47566            # do relocations at load
47567            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47568            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47569          fi
47570          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47571            # mark relocations read only
47572            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47573            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47574          fi
47575          ;;
47576        fastdebug )
47577          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47578            # mark relocations read only
47579            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47580            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47581          fi
47582          ;;
47583        * )
47584          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47585          ;;
47586        esac
47587    fi
47588  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47589    LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext"
47590    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47591  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47592    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47593  fi
47594
47595  # Customize LDFLAGS for executables
47596
47597  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47598
47599  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47600    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47601      LDFLAGS_STACK_SIZE=1048576
47602    else
47603      LDFLAGS_STACK_SIZE=327680
47604    fi
47605    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47606  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47607    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
47608  fi
47609
47610  # Customize LDFLAGS for libs
47611  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47612
47613  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
47614  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47615    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47616        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47617    JDKLIB_LIBS=""
47618  else
47619    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
47620        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47621
47622    # On some platforms (mac) the linker warns about non existing -L dirs.
47623    # Add server first if available. Linking aginst client does not always produce the same results.
47624    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47625    # Default to server for other variants.
47626    if test "x$JVM_VARIANT_SERVER" = xtrue; then
47627      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47628    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47629      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47630    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47631      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47632    else
47633      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47634    fi
47635
47636    JDKLIB_LIBS="-ljava -ljvm"
47637    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47638      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47639    fi
47640  fi
47641
47642
47643
47644
47645
47646
47647
47648  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47649  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47650
47651
47652
47653
47654
47655  # Some Zero and Shark settings.
47656  # ZERO_ARCHFLAG tells the compiler which mode to build for
47657  case "${OPENJDK_TARGET_CPU}" in
47658    s390)
47659      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47660      ;;
47661    *)
47662      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47663  esac
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706    # Execute function body
47707
47708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47709$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47710  supports=yes
47711
47712  saved_cflags="$CFLAGS"
47713  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47714  ac_ext=c
47715ac_cpp='$CPP $CPPFLAGS'
47716ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47717ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47718ac_compiler_gnu=$ac_cv_c_compiler_gnu
47719
47720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47721/* end confdefs.h.  */
47722int i;
47723_ACEOF
47724if ac_fn_c_try_compile "$LINENO"; then :
47725
47726else
47727  supports=no
47728fi
47729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47730  ac_ext=cpp
47731ac_cpp='$CXXCPP $CPPFLAGS'
47732ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47733ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47734ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47735
47736  CFLAGS="$saved_cflags"
47737
47738  saved_cxxflags="$CXXFLAGS"
47739  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47740  ac_ext=cpp
47741ac_cpp='$CXXCPP $CPPFLAGS'
47742ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47743ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47744ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47745
47746  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47747/* end confdefs.h.  */
47748int i;
47749_ACEOF
47750if ac_fn_cxx_try_compile "$LINENO"; then :
47751
47752else
47753  supports=no
47754fi
47755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47756  ac_ext=cpp
47757ac_cpp='$CXXCPP $CPPFLAGS'
47758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47761
47762  CXXFLAGS="$saved_cxxflags"
47763
47764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47765$as_echo "$supports" >&6; }
47766  if test "x$supports" = "xyes" ; then
47767    :
47768
47769  else
47770    :
47771    ZERO_ARCHFLAG=""
47772  fi
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787  # Check that the compiler supports -mX (or -qX on AIX) flags
47788  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836    # Execute function body
47837
47838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47839$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47840  supports=yes
47841
47842  saved_cflags="$CFLAGS"
47843  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47844  ac_ext=c
47845ac_cpp='$CPP $CPPFLAGS'
47846ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47847ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47848ac_compiler_gnu=$ac_cv_c_compiler_gnu
47849
47850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47851/* end confdefs.h.  */
47852int i;
47853_ACEOF
47854if ac_fn_c_try_compile "$LINENO"; then :
47855
47856else
47857  supports=no
47858fi
47859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47860  ac_ext=cpp
47861ac_cpp='$CXXCPP $CPPFLAGS'
47862ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47863ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47864ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47865
47866  CFLAGS="$saved_cflags"
47867
47868  saved_cxxflags="$CXXFLAGS"
47869  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47870  ac_ext=cpp
47871ac_cpp='$CXXCPP $CPPFLAGS'
47872ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47873ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47874ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47875
47876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47877/* end confdefs.h.  */
47878int i;
47879_ACEOF
47880if ac_fn_cxx_try_compile "$LINENO"; then :
47881
47882else
47883  supports=no
47884fi
47885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47886  ac_ext=cpp
47887ac_cpp='$CXXCPP $CPPFLAGS'
47888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47891
47892  CXXFLAGS="$saved_cxxflags"
47893
47894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47895$as_echo "$supports" >&6; }
47896  if test "x$supports" = "xyes" ; then
47897    :
47898    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47899  else
47900    :
47901    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47902  fi
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917  # Check whether --enable-warnings-as-errors was given.
47918if test "${enable_warnings_as_errors+set}" = set; then :
47919  enableval=$enable_warnings_as_errors;
47920fi
47921
47922
47923  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47924$as_echo_n "checking if native warnings are errors... " >&6; }
47925  if test "x$enable_warnings_as_errors" = "xyes"; then
47926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47927$as_echo "yes (explicitely set)" >&6; }
47928    WARNINGS_AS_ERRORS=true
47929  elif test "x$enable_warnings_as_errors" = "xno"; then
47930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47931$as_echo "no" >&6; }
47932    WARNINGS_AS_ERRORS=false
47933  elif test "x$enable_warnings_as_errors" = "x"; then
47934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47935$as_echo "yes (default)" >&6; }
47936    WARNINGS_AS_ERRORS=true
47937  else
47938    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47939  fi
47940
47941  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47942    # Set legacy hotspot variable
47943    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47944  else
47945    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47946  fi
47947
47948
47949
47950
47951  case "${TOOLCHAIN_TYPE}" in
47952    microsoft)
47953      DISABLE_WARNING_PREFIX="-wd"
47954      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47955      ;;
47956    solstudio)
47957      DISABLE_WARNING_PREFIX="-erroff="
47958      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47959      ;;
47960    gcc)
47961      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009    # Execute function body
48010
48011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48012$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48013  supports=yes
48014
48015  saved_cflags="$CFLAGS"
48016  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48017  ac_ext=c
48018ac_cpp='$CPP $CPPFLAGS'
48019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48021ac_compiler_gnu=$ac_cv_c_compiler_gnu
48022
48023  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48024/* end confdefs.h.  */
48025int i;
48026_ACEOF
48027if ac_fn_c_try_compile "$LINENO"; then :
48028
48029else
48030  supports=no
48031fi
48032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48033  ac_ext=cpp
48034ac_cpp='$CXXCPP $CPPFLAGS'
48035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48038
48039  CFLAGS="$saved_cflags"
48040
48041  saved_cxxflags="$CXXFLAGS"
48042  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48043  ac_ext=cpp
48044ac_cpp='$CXXCPP $CPPFLAGS'
48045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48048
48049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48050/* end confdefs.h.  */
48051int i;
48052_ACEOF
48053if ac_fn_cxx_try_compile "$LINENO"; then :
48054
48055else
48056  supports=no
48057fi
48058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48059  ac_ext=cpp
48060ac_cpp='$CXXCPP $CPPFLAGS'
48061ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48062ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48063ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48064
48065  CXXFLAGS="$saved_cxxflags"
48066
48067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48068$as_echo "$supports" >&6; }
48069  if test "x$supports" = "xyes" ; then
48070    :
48071    GCC_CAN_DISABLE_WARNINGS=true
48072  else
48073    :
48074    GCC_CAN_DISABLE_WARNINGS=false
48075
48076  fi
48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48090        DISABLE_WARNING_PREFIX="-Wno-"
48091      else
48092        DISABLE_WARNING_PREFIX=
48093      fi
48094      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48095      # Repeate the check for the BUILD_CC
48096      CC_OLD="$CC"
48097      CC="$BUILD_CC"
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145    # Execute function body
48146
48147  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
48148$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
48149  supports=yes
48150
48151  saved_cflags="$CFLAGS"
48152  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
48153  ac_ext=c
48154ac_cpp='$CPP $CPPFLAGS'
48155ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48156ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48157ac_compiler_gnu=$ac_cv_c_compiler_gnu
48158
48159  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48160/* end confdefs.h.  */
48161int i;
48162_ACEOF
48163if ac_fn_c_try_compile "$LINENO"; then :
48164
48165else
48166  supports=no
48167fi
48168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48169  ac_ext=cpp
48170ac_cpp='$CXXCPP $CPPFLAGS'
48171ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48172ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48173ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48174
48175  CFLAGS="$saved_cflags"
48176
48177  saved_cxxflags="$CXXFLAGS"
48178  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
48179  ac_ext=cpp
48180ac_cpp='$CXXCPP $CPPFLAGS'
48181ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48182ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48183ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48184
48185  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48186/* end confdefs.h.  */
48187int i;
48188_ACEOF
48189if ac_fn_cxx_try_compile "$LINENO"; then :
48190
48191else
48192  supports=no
48193fi
48194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48195  ac_ext=cpp
48196ac_cpp='$CXXCPP $CPPFLAGS'
48197ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48198ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48199ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48200
48201  CXXFLAGS="$saved_cxxflags"
48202
48203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48204$as_echo "$supports" >&6; }
48205  if test "x$supports" = "xyes" ; then
48206    :
48207    BUILD_CC_CAN_DISABLE_WARNINGS=true
48208  else
48209    :
48210    BUILD_CC_CAN_DISABLE_WARNINGS=false
48211
48212  fi
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
48226        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
48227      else
48228        BUILD_CC_DISABLE_WARNING_PREFIX=
48229      fi
48230      CC="$CC_OLD"
48231      ;;
48232    clang)
48233      DISABLE_WARNING_PREFIX="-Wno-"
48234      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
48235      ;;
48236  esac
48237
48238
48239
48240
48241# Setup debug symbols (need objcopy from the toolchain for that)
48242
48243  #
48244  # NATIVE_DEBUG_SYMBOLS
48245  # This must be done after the toolchain is setup, since we're looking at objcopy.
48246  #
48247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
48248$as_echo_n "checking what type of native debug symbols to use... " >&6; }
48249
48250# Check whether --with-native-debug-symbols was given.
48251if test "${with_native_debug_symbols+set}" = set; then :
48252  withval=$with_native_debug_symbols;
48253        if test "x$OPENJDK_TARGET_OS" = xaix; then
48254          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
48255            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
48256          fi
48257        fi
48258
48259else
48260
48261        if test "x$OPENJDK_TARGET_OS" = xaix; then
48262          # AIX doesn't support 'zipped' so use 'internal' as default
48263          with_native_debug_symbols="internal"
48264        else
48265          with_native_debug_symbols="zipped"
48266        fi
48267
48268fi
48269
48270  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
48271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
48272$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
48273
48274  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
48275
48276    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
48277      if test "x$OBJCOPY" = x; then
48278        # enabling of enable-debug-symbols and can't find objcopy
48279        # this is an error
48280        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
48281      fi
48282    fi
48283
48284    COMPILE_WITH_DEBUG_SYMBOLS=true
48285    COPY_DEBUG_SYMBOLS=true
48286    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
48287
48288    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
48289    DEBUG_BINARIES=false
48290    STRIP_POLICY=min_strip
48291
48292  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
48293    COMPILE_WITH_DEBUG_SYMBOLS=false
48294    COPY_DEBUG_SYMBOLS=false
48295    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
48296
48297    DEBUG_BINARIES=false
48298    STRIP_POLICY=no_strip
48299  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
48300    COMPILE_WITH_DEBUG_SYMBOLS=true
48301    COPY_DEBUG_SYMBOLS=false
48302    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
48303
48304    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
48305    DEBUG_BINARIES=true
48306    STRIP_POLICY=no_strip
48307    STRIP=""
48308
48309  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
48310
48311    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
48312      if test "x$OBJCOPY" = x; then
48313        # enabling of enable-debug-symbols and can't find objcopy
48314        # this is an error
48315        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
48316      fi
48317    fi
48318
48319    COMPILE_WITH_DEBUG_SYMBOLS=true
48320    COPY_DEBUG_SYMBOLS=true
48321    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
48322
48323    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
48324    DEBUG_BINARIES=false
48325    STRIP_POLICY=min_strip
48326  else
48327    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
48328  fi
48329
48330  # --enable-debug-symbols is deprecated.
48331  # Please use --with-native-debug-symbols=[internal,external,zipped] .
48332
48333  # Check whether --enable-debug-symbols was given.
48334if test "${enable_debug_symbols+set}" = set; then :
48335  enableval=$enable_debug_symbols;
48336fi
48337
48338  if test "x$enable_debug_symbols" != x; then
48339    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
48340$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
48341
48342    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
48343      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
48344$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
48345    fi
48346
48347  fi
48348
48349
48350  # --enable-zip-debug-info is deprecated.
48351  # Please use --with-native-debug-symbols=zipped .
48352
48353  # Check whether --enable-zip-debug-info was given.
48354if test "${enable_zip_debug_info+set}" = set; then :
48355  enableval=$enable_zip_debug_info;
48356fi
48357
48358  if test "x$enable_zip_debug_info" != x; then
48359    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
48360$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
48361
48362    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
48363      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
48364$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
48365    fi
48366
48367  fi
48368
48369
48370
48371
48372
48373
48374  # Legacy values
48375
48376
48377
48378
48379  # Check whether --enable-native-coverage was given.
48380if test "${enable_native_coverage+set}" = set; then :
48381  enableval=$enable_native_coverage;
48382fi
48383
48384  GCOV_ENABLED="false"
48385  if test "x$enable_native_coverage" = "xyes"; then
48386    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
48387      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
48388$as_echo_n "checking if native coverage is enabled... " >&6; }
48389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48390$as_echo "yes" >&6; }
48391      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
48392      GCOV_LDFLAGS="-fprofile-arcs"
48393      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
48394      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
48395      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
48396      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
48397      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
48398      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
48399      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
48400      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
48401      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
48402      GCOV_ENABLED="true"
48403    else
48404      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
48405    fi
48406  elif test "x$enable_native_coverage" = "xno"; then
48407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
48408$as_echo_n "checking if native coverage is enabled... " >&6; }
48409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48410$as_echo "no" >&6; }
48411  elif test "x$enable_native_coverage" != "x"; then
48412    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
48413  fi
48414
48415
48416
48417
48418###############################################################################
48419#
48420# Check dependencies for external and internal libraries.
48421#
48422###############################################################################
48423
48424# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
48425
48426  # When using cygwin or msys, we need a wrapper binary that renames
48427  # /cygdrive/c/ arguments into c:/ arguments and peeks into
48428  # @files and rewrites these too! This wrapper binary is
48429  # called fixpath.
48430  FIXPATH=
48431  if test "x$OPENJDK_BUILD_OS" = xwindows; then
48432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
48433$as_echo_n "checking if fixpath can be created... " >&6; }
48434    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
48435    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
48436    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
48437    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
48438      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
48439      FIXPATH="$FIXPATH_BIN -c"
48440    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
48441      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
48442      # @ was chosen as separator to minimize risk of other tools messing around with it
48443      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
48444          | tr ' ' '\n' | grep '^/./' | sort | uniq`
48445      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
48446      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
48447    fi
48448    FIXPATH_SRC_W="$FIXPATH_SRC"
48449    FIXPATH_BIN_W="$FIXPATH_BIN"
48450
48451  unix_path="$FIXPATH_SRC_W"
48452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48453    windows_path=`$CYGPATH -m "$unix_path"`
48454    FIXPATH_SRC_W="$windows_path"
48455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48456    windows_path=`cmd //c echo $unix_path`
48457    FIXPATH_SRC_W="$windows_path"
48458  fi
48459
48460
48461  unix_path="$FIXPATH_BIN_W"
48462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48463    windows_path=`$CYGPATH -m "$unix_path"`
48464    FIXPATH_BIN_W="$windows_path"
48465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48466    windows_path=`cmd //c echo $unix_path`
48467    FIXPATH_BIN_W="$windows_path"
48468  fi
48469
48470    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
48471    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
48472    cd $FIXPATH_DIR
48473    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
48474    cd $CURDIR
48475
48476    if test ! -x $FIXPATH_BIN; then
48477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48478$as_echo "no" >&6; }
48479      cat $FIXPATH_DIR/fixpath1.log
48480      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
48481    fi
48482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48483$as_echo "yes" >&6; }
48484    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
48485$as_echo_n "checking if fixpath.exe works... " >&6; }
48486    cd $FIXPATH_DIR
48487    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
48488        > $FIXPATH_DIR/fixpath2.log 2>&1
48489    cd $CURDIR
48490    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
48491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48492$as_echo "no" >&6; }
48493      cat $FIXPATH_DIR/fixpath2.log
48494      as_fn_error $? "fixpath did not work!" "$LINENO" 5
48495    fi
48496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48497$as_echo "yes" >&6; }
48498
48499    FIXPATH_DETACH_FLAG="--detach"
48500  fi
48501
48502
48503
48504
48505
48506
48507  # Check if X11 is needed
48508  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
48509    # No X11 support on windows or macosx
48510    NEEDS_LIB_X11=false
48511  else
48512    if test "x$SUPPORT_HEADFUL" = xno; then
48513      # No X11 support if building headless-only
48514      NEEDS_LIB_X11=false
48515    else
48516      # All other instances need X11
48517      NEEDS_LIB_X11=true
48518    fi
48519  fi
48520
48521  # Check if cups is needed
48522  if test "x$OPENJDK_TARGET_OS" = xwindows; then
48523    # Windows have a separate print system
48524    NEEDS_LIB_CUPS=false
48525  else
48526    NEEDS_LIB_CUPS=true
48527  fi
48528
48529  # Check if freetype is needed
48530  if test "x$OPENJDK" = "xtrue"; then
48531    NEEDS_LIB_FREETYPE=true
48532  else
48533    NEEDS_LIB_FREETYPE=false
48534  fi
48535
48536  # Check if alsa is needed
48537  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48538    NEEDS_LIB_ALSA=true
48539  else
48540    NEEDS_LIB_ALSA=false
48541  fi
48542
48543  # Check if ffi is needed
48544  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48545    NEEDS_LIB_FFI=true
48546  else
48547    NEEDS_LIB_FFI=false
48548  fi
48549
48550
48551  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48552  # dynamic build is configured on command line.
48553
48554# Check whether --with-stdc++lib was given.
48555if test "${with_stdc__lib+set}" = set; then :
48556  withval=$with_stdc__lib;
48557        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48558                && test "x$with_stdc__lib" != xdefault; then
48559          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48560        fi
48561
48562else
48563  with_stdc__lib=default
48564
48565fi
48566
48567
48568  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48569    # Test if -lstdc++ works.
48570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48571$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48572    ac_ext=cpp
48573ac_cpp='$CXXCPP $CPPFLAGS'
48574ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48575ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48576ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48577
48578    OLD_CXXFLAGS="$CXXFLAGS"
48579    CXXFLAGS="$CXXFLAGS -lstdc++"
48580    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48581/* end confdefs.h.  */
48582
48583int
48584main ()
48585{
48586return 0;
48587  ;
48588  return 0;
48589}
48590_ACEOF
48591if ac_fn_cxx_try_link "$LINENO"; then :
48592  has_dynamic_libstdcxx=yes
48593else
48594  has_dynamic_libstdcxx=no
48595fi
48596rm -f core conftest.err conftest.$ac_objext \
48597    conftest$ac_exeext conftest.$ac_ext
48598    CXXFLAGS="$OLD_CXXFLAGS"
48599    ac_ext=cpp
48600ac_cpp='$CXXCPP $CPPFLAGS'
48601ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48602ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48603ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48604
48605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48606$as_echo "$has_dynamic_libstdcxx" >&6; }
48607
48608    # Test if stdc++ can be linked statically.
48609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48610$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48611    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48612    ac_ext=cpp
48613ac_cpp='$CXXCPP $CPPFLAGS'
48614ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48615ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48616ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48617
48618    OLD_LIBS="$LIBS"
48619    OLD_CXX="$CXX"
48620    LIBS="$STATIC_STDCXX_FLAGS"
48621    CXX="$CC"
48622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48623/* end confdefs.h.  */
48624
48625int
48626main ()
48627{
48628return 0;
48629  ;
48630  return 0;
48631}
48632_ACEOF
48633if ac_fn_cxx_try_link "$LINENO"; then :
48634  has_static_libstdcxx=yes
48635else
48636  has_static_libstdcxx=no
48637fi
48638rm -f core conftest.err conftest.$ac_objext \
48639    conftest$ac_exeext conftest.$ac_ext
48640    LIBS="$OLD_LIBS"
48641    CXX="$OLD_CXX"
48642    ac_ext=cpp
48643ac_cpp='$CXXCPP $CPPFLAGS'
48644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48647
48648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48649$as_echo "$has_static_libstdcxx" >&6; }
48650
48651    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48652      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48653    fi
48654
48655    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48656      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48657    fi
48658
48659    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48660      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48661    fi
48662
48663    # If dynamic was requested, it's available since it would fail above otherwise.
48664    # If dynamic wasn't requested, go with static unless it isn't available.
48665    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48666$as_echo_n "checking how to link with libstdc++... " >&6; }
48667    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48668      LIBCXX="$LIBCXX -lstdc++"
48669      LDCXX="$CXX"
48670      STATIC_CXX_SETTING="STATIC_CXX=false"
48671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48672$as_echo "dynamic" >&6; }
48673    else
48674      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48675      LDCXX="$CC"
48676      STATIC_CXX_SETTING="STATIC_CXX=true"
48677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48678$as_echo "static" >&6; }
48679    fi
48680  fi
48681
48682
48683  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48684  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48685    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48686  fi
48687
48688  # TODO better (platform agnostic) test
48689  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48690    LIBCXX="-lstdc++"
48691  fi
48692
48693
48694  # Setup Windows runtime dlls
48695  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48696
48697
48698# Check whether --with-msvcr-dll was given.
48699if test "${with_msvcr_dll+set}" = set; then :
48700  withval=$with_msvcr_dll;
48701fi
48702
48703
48704  if test "x$with_msvcr_dll" != x; then
48705    # If given explicitely by user, do not probe. If not present, fail directly.
48706
48707  DLL_NAME="$MSVCR_NAME"
48708  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48709  METHOD="--with-msvcr-dll"
48710  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48712$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48713
48714    # Need to check if the found msvcr is correct architecture
48715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48716$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48717    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48719      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48720      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48721      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48722        CORRECT_MSVCR_ARCH="PE32 executable"
48723      else
48724        CORRECT_MSVCR_ARCH="PE32+ executable"
48725      fi
48726    else
48727      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48728        CORRECT_MSVCR_ARCH=386
48729      else
48730        CORRECT_MSVCR_ARCH=x86-64
48731      fi
48732    fi
48733    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48735$as_echo "ok" >&6; }
48736      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48737
48738  # Only process if variable expands to non-empty
48739
48740  if test "x$MSVC_DLL" != x; then
48741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48742
48743  # Input might be given as Windows format, start by converting to
48744  # unix format.
48745  path="$MSVC_DLL"
48746  new_path=`$CYGPATH -u "$path"`
48747
48748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48751  # "foo.exe" is OK but "foo" is an error.
48752  #
48753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48754  # It is also a way to make sure we got the proper file name for the real test later on.
48755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48756  if test "x$test_shortpath" = x; then
48757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48758$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48759    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48760  fi
48761
48762  # Call helper function which possibly converts this using DOS-style short mode.
48763  # If so, the updated path is stored in $new_path.
48764
48765  input_path="$new_path"
48766  # Check if we need to convert this using DOS-style short mode. If the path
48767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48768  # take no chances and rewrite it.
48769  # Note: m4 eats our [], so we need to use [ and ] instead.
48770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48771  if test "x$has_forbidden_chars" != x; then
48772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48776      # Going to short mode and back again did indeed matter. Since short mode is
48777      # case insensitive, let's make it lowercase to improve readability.
48778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48779      # Now convert it back to Unix-style (cygpath)
48780      input_path=`$CYGPATH -u "$shortmode_path"`
48781      new_path="$input_path"
48782    fi
48783  fi
48784
48785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48786  if test "x$test_cygdrive_prefix" = x; then
48787    # As a simple fix, exclude /usr/bin since it's not a real path.
48788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48790      # a path prefixed by /cygdrive for fixpath to work.
48791      new_path="$CYGWIN_ROOT_PATH$input_path"
48792    fi
48793  fi
48794
48795
48796  if test "x$path" != "x$new_path"; then
48797    MSVC_DLL="$new_path"
48798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48799$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48800  fi
48801
48802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48803
48804  path="$MSVC_DLL"
48805  has_colon=`$ECHO $path | $GREP ^.:`
48806  new_path="$path"
48807  if test "x$has_colon" = x; then
48808    # Not in mixed or Windows style, start by that.
48809    new_path=`cmd //c echo $path`
48810  fi
48811
48812
48813  input_path="$new_path"
48814  # Check if we need to convert this using DOS-style short mode. If the path
48815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48816  # take no chances and rewrite it.
48817  # Note: m4 eats our [], so we need to use [ and ] instead.
48818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48819  if test "x$has_forbidden_chars" != x; then
48820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48822  fi
48823
48824
48825  windows_path="$new_path"
48826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48827    unix_path=`$CYGPATH -u "$windows_path"`
48828    new_path="$unix_path"
48829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48831    new_path="$unix_path"
48832  fi
48833
48834  if test "x$path" != "x$new_path"; then
48835    MSVC_DLL="$new_path"
48836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48837$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48838  fi
48839
48840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48842
48843    else
48844      # We're on a unix platform. Hooray! :)
48845      path="$MSVC_DLL"
48846      has_space=`$ECHO "$path" | $GREP " "`
48847      if test "x$has_space" != x; then
48848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48849$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48851      fi
48852
48853      # Use eval to expand a potential ~
48854      eval path="$path"
48855      if test ! -f "$path" && test ! -d "$path"; then
48856        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48857      fi
48858
48859      if test -d "$path"; then
48860        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48861      else
48862        dir="`$DIRNAME "$path"`"
48863        base="`$BASENAME "$path"`"
48864        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48865      fi
48866    fi
48867  fi
48868
48869      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48870$as_echo_n "checking for $DLL_NAME... " >&6; }
48871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48872$as_echo "$MSVC_DLL" >&6; }
48873    else
48874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48875$as_echo "incorrect, ignoring" >&6; }
48876      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48877$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48878    fi
48879  fi
48880
48881    if test "x$MSVC_DLL" = x; then
48882      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48883    fi
48884    MSVCR_DLL="$MSVC_DLL"
48885  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48886
48887  DLL_NAME="$MSVCR_NAME"
48888  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48889  METHOD="devkit"
48890  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48891    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48892$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48893
48894    # Need to check if the found msvcr is correct architecture
48895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48896$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48897    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48899      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48900      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48902        CORRECT_MSVCR_ARCH="PE32 executable"
48903      else
48904        CORRECT_MSVCR_ARCH="PE32+ executable"
48905      fi
48906    else
48907      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48908        CORRECT_MSVCR_ARCH=386
48909      else
48910        CORRECT_MSVCR_ARCH=x86-64
48911      fi
48912    fi
48913    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48915$as_echo "ok" >&6; }
48916      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48917
48918  # Only process if variable expands to non-empty
48919
48920  if test "x$MSVC_DLL" != x; then
48921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48922
48923  # Input might be given as Windows format, start by converting to
48924  # unix format.
48925  path="$MSVC_DLL"
48926  new_path=`$CYGPATH -u "$path"`
48927
48928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48931  # "foo.exe" is OK but "foo" is an error.
48932  #
48933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48934  # It is also a way to make sure we got the proper file name for the real test later on.
48935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48936  if test "x$test_shortpath" = x; then
48937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48938$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48939    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48940  fi
48941
48942  # Call helper function which possibly converts this using DOS-style short mode.
48943  # If so, the updated path is stored in $new_path.
48944
48945  input_path="$new_path"
48946  # Check if we need to convert this using DOS-style short mode. If the path
48947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48948  # take no chances and rewrite it.
48949  # Note: m4 eats our [], so we need to use [ and ] instead.
48950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48951  if test "x$has_forbidden_chars" != x; then
48952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48956      # Going to short mode and back again did indeed matter. Since short mode is
48957      # case insensitive, let's make it lowercase to improve readability.
48958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48959      # Now convert it back to Unix-style (cygpath)
48960      input_path=`$CYGPATH -u "$shortmode_path"`
48961      new_path="$input_path"
48962    fi
48963  fi
48964
48965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48966  if test "x$test_cygdrive_prefix" = x; then
48967    # As a simple fix, exclude /usr/bin since it's not a real path.
48968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48970      # a path prefixed by /cygdrive for fixpath to work.
48971      new_path="$CYGWIN_ROOT_PATH$input_path"
48972    fi
48973  fi
48974
48975
48976  if test "x$path" != "x$new_path"; then
48977    MSVC_DLL="$new_path"
48978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48979$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48980  fi
48981
48982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48983
48984  path="$MSVC_DLL"
48985  has_colon=`$ECHO $path | $GREP ^.:`
48986  new_path="$path"
48987  if test "x$has_colon" = x; then
48988    # Not in mixed or Windows style, start by that.
48989    new_path=`cmd //c echo $path`
48990  fi
48991
48992
48993  input_path="$new_path"
48994  # Check if we need to convert this using DOS-style short mode. If the path
48995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48996  # take no chances and rewrite it.
48997  # Note: m4 eats our [], so we need to use [ and ] instead.
48998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48999  if test "x$has_forbidden_chars" != x; then
49000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49002  fi
49003
49004
49005  windows_path="$new_path"
49006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49007    unix_path=`$CYGPATH -u "$windows_path"`
49008    new_path="$unix_path"
49009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49011    new_path="$unix_path"
49012  fi
49013
49014  if test "x$path" != "x$new_path"; then
49015    MSVC_DLL="$new_path"
49016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49017$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49018  fi
49019
49020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49022
49023    else
49024      # We're on a unix platform. Hooray! :)
49025      path="$MSVC_DLL"
49026      has_space=`$ECHO "$path" | $GREP " "`
49027      if test "x$has_space" != x; then
49028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49029$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49031      fi
49032
49033      # Use eval to expand a potential ~
49034      eval path="$path"
49035      if test ! -f "$path" && test ! -d "$path"; then
49036        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49037      fi
49038
49039      if test -d "$path"; then
49040        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49041      else
49042        dir="`$DIRNAME "$path"`"
49043        base="`$BASENAME "$path"`"
49044        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49045      fi
49046    fi
49047  fi
49048
49049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49050$as_echo_n "checking for $DLL_NAME... " >&6; }
49051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49052$as_echo "$MSVC_DLL" >&6; }
49053    else
49054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49055$as_echo "incorrect, ignoring" >&6; }
49056      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49057$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49058    fi
49059  fi
49060
49061    if test "x$MSVC_DLL" = x; then
49062      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49063    fi
49064    MSVCR_DLL="$MSVC_DLL"
49065  else
49066
49067  DLL_NAME="${MSVCR_NAME}"
49068  MSVC_DLL=
49069
49070  if test "x$MSVC_DLL" = x; then
49071    # Probe: Using well-known location from Visual Studio 10.0
49072    if test "x$VCINSTALLDIR" != x; then
49073      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49074
49075  windows_path="$CYGWIN_VC_INSTALL_DIR"
49076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49077    unix_path=`$CYGPATH -u "$windows_path"`
49078    CYGWIN_VC_INSTALL_DIR="$unix_path"
49079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49081    CYGWIN_VC_INSTALL_DIR="$unix_path"
49082  fi
49083
49084      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49085        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49086      else
49087        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49088      fi
49089      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49090
49091  DLL_NAME="$DLL_NAME"
49092  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49093  METHOD="well-known location in VCINSTALLDIR"
49094  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49095    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49096$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49097
49098    # Need to check if the found msvcr is correct architecture
49099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49100$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49101    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49103      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49104      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49105      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49106        CORRECT_MSVCR_ARCH="PE32 executable"
49107      else
49108        CORRECT_MSVCR_ARCH="PE32+ executable"
49109      fi
49110    else
49111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49112        CORRECT_MSVCR_ARCH=386
49113      else
49114        CORRECT_MSVCR_ARCH=x86-64
49115      fi
49116    fi
49117    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49119$as_echo "ok" >&6; }
49120      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49121
49122  # Only process if variable expands to non-empty
49123
49124  if test "x$MSVC_DLL" != x; then
49125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49126
49127  # Input might be given as Windows format, start by converting to
49128  # unix format.
49129  path="$MSVC_DLL"
49130  new_path=`$CYGPATH -u "$path"`
49131
49132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49135  # "foo.exe" is OK but "foo" is an error.
49136  #
49137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49138  # It is also a way to make sure we got the proper file name for the real test later on.
49139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49140  if test "x$test_shortpath" = x; then
49141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49142$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49143    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49144  fi
49145
49146  # Call helper function which possibly converts this using DOS-style short mode.
49147  # If so, the updated path is stored in $new_path.
49148
49149  input_path="$new_path"
49150  # Check if we need to convert this using DOS-style short mode. If the path
49151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49152  # take no chances and rewrite it.
49153  # Note: m4 eats our [], so we need to use [ and ] instead.
49154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49155  if test "x$has_forbidden_chars" != x; then
49156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49160      # Going to short mode and back again did indeed matter. Since short mode is
49161      # case insensitive, let's make it lowercase to improve readability.
49162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49163      # Now convert it back to Unix-style (cygpath)
49164      input_path=`$CYGPATH -u "$shortmode_path"`
49165      new_path="$input_path"
49166    fi
49167  fi
49168
49169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49170  if test "x$test_cygdrive_prefix" = x; then
49171    # As a simple fix, exclude /usr/bin since it's not a real path.
49172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49174      # a path prefixed by /cygdrive for fixpath to work.
49175      new_path="$CYGWIN_ROOT_PATH$input_path"
49176    fi
49177  fi
49178
49179
49180  if test "x$path" != "x$new_path"; then
49181    MSVC_DLL="$new_path"
49182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49183$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49184  fi
49185
49186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49187
49188  path="$MSVC_DLL"
49189  has_colon=`$ECHO $path | $GREP ^.:`
49190  new_path="$path"
49191  if test "x$has_colon" = x; then
49192    # Not in mixed or Windows style, start by that.
49193    new_path=`cmd //c echo $path`
49194  fi
49195
49196
49197  input_path="$new_path"
49198  # Check if we need to convert this using DOS-style short mode. If the path
49199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49200  # take no chances and rewrite it.
49201  # Note: m4 eats our [], so we need to use [ and ] instead.
49202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49203  if test "x$has_forbidden_chars" != x; then
49204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49206  fi
49207
49208
49209  windows_path="$new_path"
49210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49211    unix_path=`$CYGPATH -u "$windows_path"`
49212    new_path="$unix_path"
49213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49215    new_path="$unix_path"
49216  fi
49217
49218  if test "x$path" != "x$new_path"; then
49219    MSVC_DLL="$new_path"
49220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49221$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49222  fi
49223
49224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49226
49227    else
49228      # We're on a unix platform. Hooray! :)
49229      path="$MSVC_DLL"
49230      has_space=`$ECHO "$path" | $GREP " "`
49231      if test "x$has_space" != x; then
49232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49233$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49235      fi
49236
49237      # Use eval to expand a potential ~
49238      eval path="$path"
49239      if test ! -f "$path" && test ! -d "$path"; then
49240        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49241      fi
49242
49243      if test -d "$path"; then
49244        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49245      else
49246        dir="`$DIRNAME "$path"`"
49247        base="`$BASENAME "$path"`"
49248        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49249      fi
49250    fi
49251  fi
49252
49253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49254$as_echo_n "checking for $DLL_NAME... " >&6; }
49255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49256$as_echo "$MSVC_DLL" >&6; }
49257    else
49258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49259$as_echo "incorrect, ignoring" >&6; }
49260      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49261$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49262    fi
49263  fi
49264
49265    fi
49266  fi
49267
49268  if test "x$MSVC_DLL" = x; then
49269    # Probe: Check in the Boot JDK directory.
49270    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49271
49272  DLL_NAME="$DLL_NAME"
49273  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49274  METHOD="well-known location in Boot JDK"
49275  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49276    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49277$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49278
49279    # Need to check if the found msvcr is correct architecture
49280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49281$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49282    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49284      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49285      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49286      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49287        CORRECT_MSVCR_ARCH="PE32 executable"
49288      else
49289        CORRECT_MSVCR_ARCH="PE32+ executable"
49290      fi
49291    else
49292      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49293        CORRECT_MSVCR_ARCH=386
49294      else
49295        CORRECT_MSVCR_ARCH=x86-64
49296      fi
49297    fi
49298    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49300$as_echo "ok" >&6; }
49301      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49302
49303  # Only process if variable expands to non-empty
49304
49305  if test "x$MSVC_DLL" != x; then
49306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49307
49308  # Input might be given as Windows format, start by converting to
49309  # unix format.
49310  path="$MSVC_DLL"
49311  new_path=`$CYGPATH -u "$path"`
49312
49313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49316  # "foo.exe" is OK but "foo" is an error.
49317  #
49318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49319  # It is also a way to make sure we got the proper file name for the real test later on.
49320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49321  if test "x$test_shortpath" = x; then
49322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49323$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49324    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49325  fi
49326
49327  # Call helper function which possibly converts this using DOS-style short mode.
49328  # If so, the updated path is stored in $new_path.
49329
49330  input_path="$new_path"
49331  # Check if we need to convert this using DOS-style short mode. If the path
49332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49333  # take no chances and rewrite it.
49334  # Note: m4 eats our [], so we need to use [ and ] instead.
49335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49336  if test "x$has_forbidden_chars" != x; then
49337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49341      # Going to short mode and back again did indeed matter. Since short mode is
49342      # case insensitive, let's make it lowercase to improve readability.
49343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49344      # Now convert it back to Unix-style (cygpath)
49345      input_path=`$CYGPATH -u "$shortmode_path"`
49346      new_path="$input_path"
49347    fi
49348  fi
49349
49350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49351  if test "x$test_cygdrive_prefix" = x; then
49352    # As a simple fix, exclude /usr/bin since it's not a real path.
49353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49355      # a path prefixed by /cygdrive for fixpath to work.
49356      new_path="$CYGWIN_ROOT_PATH$input_path"
49357    fi
49358  fi
49359
49360
49361  if test "x$path" != "x$new_path"; then
49362    MSVC_DLL="$new_path"
49363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49364$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49365  fi
49366
49367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49368
49369  path="$MSVC_DLL"
49370  has_colon=`$ECHO $path | $GREP ^.:`
49371  new_path="$path"
49372  if test "x$has_colon" = x; then
49373    # Not in mixed or Windows style, start by that.
49374    new_path=`cmd //c echo $path`
49375  fi
49376
49377
49378  input_path="$new_path"
49379  # Check if we need to convert this using DOS-style short mode. If the path
49380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49381  # take no chances and rewrite it.
49382  # Note: m4 eats our [], so we need to use [ and ] instead.
49383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49384  if test "x$has_forbidden_chars" != x; then
49385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49387  fi
49388
49389
49390  windows_path="$new_path"
49391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49392    unix_path=`$CYGPATH -u "$windows_path"`
49393    new_path="$unix_path"
49394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49396    new_path="$unix_path"
49397  fi
49398
49399  if test "x$path" != "x$new_path"; then
49400    MSVC_DLL="$new_path"
49401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49402$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49403  fi
49404
49405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49407
49408    else
49409      # We're on a unix platform. Hooray! :)
49410      path="$MSVC_DLL"
49411      has_space=`$ECHO "$path" | $GREP " "`
49412      if test "x$has_space" != x; then
49413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49414$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49415        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49416      fi
49417
49418      # Use eval to expand a potential ~
49419      eval path="$path"
49420      if test ! -f "$path" && test ! -d "$path"; then
49421        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49422      fi
49423
49424      if test -d "$path"; then
49425        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49426      else
49427        dir="`$DIRNAME "$path"`"
49428        base="`$BASENAME "$path"`"
49429        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49430      fi
49431    fi
49432  fi
49433
49434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49435$as_echo_n "checking for $DLL_NAME... " >&6; }
49436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49437$as_echo "$MSVC_DLL" >&6; }
49438    else
49439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49440$as_echo "incorrect, ignoring" >&6; }
49441      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49442$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49443    fi
49444  fi
49445
49446  fi
49447
49448  if test "x$MSVC_DLL" = x; then
49449    # Probe: Look in the Windows system32 directory
49450    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49451
49452  windows_path="$CYGWIN_SYSTEMROOT"
49453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49454    unix_path=`$CYGPATH -u "$windows_path"`
49455    CYGWIN_SYSTEMROOT="$unix_path"
49456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49458    CYGWIN_SYSTEMROOT="$unix_path"
49459  fi
49460
49461    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49462
49463  DLL_NAME="$DLL_NAME"
49464  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49465  METHOD="well-known location in SYSTEMROOT"
49466  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49467    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49468$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49469
49470    # Need to check if the found msvcr is correct architecture
49471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49472$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49473    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49475      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49476      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49477      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49478        CORRECT_MSVCR_ARCH="PE32 executable"
49479      else
49480        CORRECT_MSVCR_ARCH="PE32+ executable"
49481      fi
49482    else
49483      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49484        CORRECT_MSVCR_ARCH=386
49485      else
49486        CORRECT_MSVCR_ARCH=x86-64
49487      fi
49488    fi
49489    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49491$as_echo "ok" >&6; }
49492      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49493
49494  # Only process if variable expands to non-empty
49495
49496  if test "x$MSVC_DLL" != x; then
49497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49498
49499  # Input might be given as Windows format, start by converting to
49500  # unix format.
49501  path="$MSVC_DLL"
49502  new_path=`$CYGPATH -u "$path"`
49503
49504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49507  # "foo.exe" is OK but "foo" is an error.
49508  #
49509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49510  # It is also a way to make sure we got the proper file name for the real test later on.
49511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49512  if test "x$test_shortpath" = x; then
49513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49514$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49515    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49516  fi
49517
49518  # Call helper function which possibly converts this using DOS-style short mode.
49519  # If so, the updated path is stored in $new_path.
49520
49521  input_path="$new_path"
49522  # Check if we need to convert this using DOS-style short mode. If the path
49523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49524  # take no chances and rewrite it.
49525  # Note: m4 eats our [], so we need to use [ and ] instead.
49526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49527  if test "x$has_forbidden_chars" != x; then
49528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49532      # Going to short mode and back again did indeed matter. Since short mode is
49533      # case insensitive, let's make it lowercase to improve readability.
49534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49535      # Now convert it back to Unix-style (cygpath)
49536      input_path=`$CYGPATH -u "$shortmode_path"`
49537      new_path="$input_path"
49538    fi
49539  fi
49540
49541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49542  if test "x$test_cygdrive_prefix" = x; then
49543    # As a simple fix, exclude /usr/bin since it's not a real path.
49544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49546      # a path prefixed by /cygdrive for fixpath to work.
49547      new_path="$CYGWIN_ROOT_PATH$input_path"
49548    fi
49549  fi
49550
49551
49552  if test "x$path" != "x$new_path"; then
49553    MSVC_DLL="$new_path"
49554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49555$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49556  fi
49557
49558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49559
49560  path="$MSVC_DLL"
49561  has_colon=`$ECHO $path | $GREP ^.:`
49562  new_path="$path"
49563  if test "x$has_colon" = x; then
49564    # Not in mixed or Windows style, start by that.
49565    new_path=`cmd //c echo $path`
49566  fi
49567
49568
49569  input_path="$new_path"
49570  # Check if we need to convert this using DOS-style short mode. If the path
49571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49572  # take no chances and rewrite it.
49573  # Note: m4 eats our [], so we need to use [ and ] instead.
49574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49575  if test "x$has_forbidden_chars" != x; then
49576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49578  fi
49579
49580
49581  windows_path="$new_path"
49582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49583    unix_path=`$CYGPATH -u "$windows_path"`
49584    new_path="$unix_path"
49585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49587    new_path="$unix_path"
49588  fi
49589
49590  if test "x$path" != "x$new_path"; then
49591    MSVC_DLL="$new_path"
49592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49593$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49594  fi
49595
49596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49598
49599    else
49600      # We're on a unix platform. Hooray! :)
49601      path="$MSVC_DLL"
49602      has_space=`$ECHO "$path" | $GREP " "`
49603      if test "x$has_space" != x; then
49604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49605$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49607      fi
49608
49609      # Use eval to expand a potential ~
49610      eval path="$path"
49611      if test ! -f "$path" && test ! -d "$path"; then
49612        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49613      fi
49614
49615      if test -d "$path"; then
49616        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49617      else
49618        dir="`$DIRNAME "$path"`"
49619        base="`$BASENAME "$path"`"
49620        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49621      fi
49622    fi
49623  fi
49624
49625      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49626$as_echo_n "checking for $DLL_NAME... " >&6; }
49627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49628$as_echo "$MSVC_DLL" >&6; }
49629    else
49630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49631$as_echo "incorrect, ignoring" >&6; }
49632      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49633$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49634    fi
49635  fi
49636
49637  fi
49638
49639  if test "x$MSVC_DLL" = x; then
49640    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49641    if test "x$VS100COMNTOOLS" != x; then
49642      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49643
49644  windows_path="$CYGWIN_VS_TOOLS_DIR"
49645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49646    unix_path=`$CYGPATH -u "$windows_path"`
49647    CYGWIN_VS_TOOLS_DIR="$unix_path"
49648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49650    CYGWIN_VS_TOOLS_DIR="$unix_path"
49651  fi
49652
49653      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49654        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49655	    | $GREP -i /x64/ | $HEAD --lines 1`
49656      else
49657        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49658	    | $GREP -i /x86/ | $HEAD --lines 1`
49659      fi
49660
49661  DLL_NAME="$DLL_NAME"
49662  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49663  METHOD="search of VS100COMNTOOLS"
49664  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49665    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49666$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49667
49668    # Need to check if the found msvcr is correct architecture
49669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49670$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49671    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49673      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49674      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49675      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49676        CORRECT_MSVCR_ARCH="PE32 executable"
49677      else
49678        CORRECT_MSVCR_ARCH="PE32+ executable"
49679      fi
49680    else
49681      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49682        CORRECT_MSVCR_ARCH=386
49683      else
49684        CORRECT_MSVCR_ARCH=x86-64
49685      fi
49686    fi
49687    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49689$as_echo "ok" >&6; }
49690      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49691
49692  # Only process if variable expands to non-empty
49693
49694  if test "x$MSVC_DLL" != x; then
49695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49696
49697  # Input might be given as Windows format, start by converting to
49698  # unix format.
49699  path="$MSVC_DLL"
49700  new_path=`$CYGPATH -u "$path"`
49701
49702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49705  # "foo.exe" is OK but "foo" is an error.
49706  #
49707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49708  # It is also a way to make sure we got the proper file name for the real test later on.
49709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49710  if test "x$test_shortpath" = x; then
49711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49712$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49713    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49714  fi
49715
49716  # Call helper function which possibly converts this using DOS-style short mode.
49717  # If so, the updated path is stored in $new_path.
49718
49719  input_path="$new_path"
49720  # Check if we need to convert this using DOS-style short mode. If the path
49721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49722  # take no chances and rewrite it.
49723  # Note: m4 eats our [], so we need to use [ and ] instead.
49724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49725  if test "x$has_forbidden_chars" != x; then
49726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49730      # Going to short mode and back again did indeed matter. Since short mode is
49731      # case insensitive, let's make it lowercase to improve readability.
49732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49733      # Now convert it back to Unix-style (cygpath)
49734      input_path=`$CYGPATH -u "$shortmode_path"`
49735      new_path="$input_path"
49736    fi
49737  fi
49738
49739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49740  if test "x$test_cygdrive_prefix" = x; then
49741    # As a simple fix, exclude /usr/bin since it's not a real path.
49742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49744      # a path prefixed by /cygdrive for fixpath to work.
49745      new_path="$CYGWIN_ROOT_PATH$input_path"
49746    fi
49747  fi
49748
49749
49750  if test "x$path" != "x$new_path"; then
49751    MSVC_DLL="$new_path"
49752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49753$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49754  fi
49755
49756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49757
49758  path="$MSVC_DLL"
49759  has_colon=`$ECHO $path | $GREP ^.:`
49760  new_path="$path"
49761  if test "x$has_colon" = x; then
49762    # Not in mixed or Windows style, start by that.
49763    new_path=`cmd //c echo $path`
49764  fi
49765
49766
49767  input_path="$new_path"
49768  # Check if we need to convert this using DOS-style short mode. If the path
49769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49770  # take no chances and rewrite it.
49771  # Note: m4 eats our [], so we need to use [ and ] instead.
49772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49773  if test "x$has_forbidden_chars" != x; then
49774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49776  fi
49777
49778
49779  windows_path="$new_path"
49780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49781    unix_path=`$CYGPATH -u "$windows_path"`
49782    new_path="$unix_path"
49783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49785    new_path="$unix_path"
49786  fi
49787
49788  if test "x$path" != "x$new_path"; then
49789    MSVC_DLL="$new_path"
49790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49791$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49792  fi
49793
49794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49796
49797    else
49798      # We're on a unix platform. Hooray! :)
49799      path="$MSVC_DLL"
49800      has_space=`$ECHO "$path" | $GREP " "`
49801      if test "x$has_space" != x; then
49802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49803$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49805      fi
49806
49807      # Use eval to expand a potential ~
49808      eval path="$path"
49809      if test ! -f "$path" && test ! -d "$path"; then
49810        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49811      fi
49812
49813      if test -d "$path"; then
49814        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49815      else
49816        dir="`$DIRNAME "$path"`"
49817        base="`$BASENAME "$path"`"
49818        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49819      fi
49820    fi
49821  fi
49822
49823      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49824$as_echo_n "checking for $DLL_NAME... " >&6; }
49825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49826$as_echo "$MSVC_DLL" >&6; }
49827    else
49828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49829$as_echo "incorrect, ignoring" >&6; }
49830      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49831$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49832    fi
49833  fi
49834
49835    fi
49836  fi
49837
49838  if test "x$MSVC_DLL" = x; then
49839    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49840    # (This was the original behaviour; kept since it might turn something up)
49841    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49842      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49843        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49844	    | $GREP x64 | $HEAD --lines 1`
49845      else
49846        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49847	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49848        if test "x$POSSIBLE_MSVC_DLL" = x; then
49849          # We're grasping at straws now...
49850          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49851	      | $HEAD --lines 1`
49852        fi
49853      fi
49854
49855
49856  DLL_NAME="$DLL_NAME"
49857  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49858  METHOD="search of VCINSTALLDIR"
49859  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49860    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49861$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49862
49863    # Need to check if the found msvcr is correct architecture
49864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49865$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49866    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49868      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49869      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49870      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49871        CORRECT_MSVCR_ARCH="PE32 executable"
49872      else
49873        CORRECT_MSVCR_ARCH="PE32+ executable"
49874      fi
49875    else
49876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49877        CORRECT_MSVCR_ARCH=386
49878      else
49879        CORRECT_MSVCR_ARCH=x86-64
49880      fi
49881    fi
49882    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49884$as_echo "ok" >&6; }
49885      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49886
49887  # Only process if variable expands to non-empty
49888
49889  if test "x$MSVC_DLL" != x; then
49890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49891
49892  # Input might be given as Windows format, start by converting to
49893  # unix format.
49894  path="$MSVC_DLL"
49895  new_path=`$CYGPATH -u "$path"`
49896
49897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49900  # "foo.exe" is OK but "foo" is an error.
49901  #
49902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49903  # It is also a way to make sure we got the proper file name for the real test later on.
49904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49905  if test "x$test_shortpath" = x; then
49906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49907$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49908    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49909  fi
49910
49911  # Call helper function which possibly converts this using DOS-style short mode.
49912  # If so, the updated path is stored in $new_path.
49913
49914  input_path="$new_path"
49915  # Check if we need to convert this using DOS-style short mode. If the path
49916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49917  # take no chances and rewrite it.
49918  # Note: m4 eats our [], so we need to use [ and ] instead.
49919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49920  if test "x$has_forbidden_chars" != x; then
49921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49925      # Going to short mode and back again did indeed matter. Since short mode is
49926      # case insensitive, let's make it lowercase to improve readability.
49927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49928      # Now convert it back to Unix-style (cygpath)
49929      input_path=`$CYGPATH -u "$shortmode_path"`
49930      new_path="$input_path"
49931    fi
49932  fi
49933
49934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49935  if test "x$test_cygdrive_prefix" = x; then
49936    # As a simple fix, exclude /usr/bin since it's not a real path.
49937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49939      # a path prefixed by /cygdrive for fixpath to work.
49940      new_path="$CYGWIN_ROOT_PATH$input_path"
49941    fi
49942  fi
49943
49944
49945  if test "x$path" != "x$new_path"; then
49946    MSVC_DLL="$new_path"
49947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49948$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49949  fi
49950
49951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49952
49953  path="$MSVC_DLL"
49954  has_colon=`$ECHO $path | $GREP ^.:`
49955  new_path="$path"
49956  if test "x$has_colon" = x; then
49957    # Not in mixed or Windows style, start by that.
49958    new_path=`cmd //c echo $path`
49959  fi
49960
49961
49962  input_path="$new_path"
49963  # Check if we need to convert this using DOS-style short mode. If the path
49964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49965  # take no chances and rewrite it.
49966  # Note: m4 eats our [], so we need to use [ and ] instead.
49967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49968  if test "x$has_forbidden_chars" != x; then
49969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49971  fi
49972
49973
49974  windows_path="$new_path"
49975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49976    unix_path=`$CYGPATH -u "$windows_path"`
49977    new_path="$unix_path"
49978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49980    new_path="$unix_path"
49981  fi
49982
49983  if test "x$path" != "x$new_path"; then
49984    MSVC_DLL="$new_path"
49985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49986$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49987  fi
49988
49989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49991
49992    else
49993      # We're on a unix platform. Hooray! :)
49994      path="$MSVC_DLL"
49995      has_space=`$ECHO "$path" | $GREP " "`
49996      if test "x$has_space" != x; then
49997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49998$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49999        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50000      fi
50001
50002      # Use eval to expand a potential ~
50003      eval path="$path"
50004      if test ! -f "$path" && test ! -d "$path"; then
50005        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50006      fi
50007
50008      if test -d "$path"; then
50009        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50010      else
50011        dir="`$DIRNAME "$path"`"
50012        base="`$BASENAME "$path"`"
50013        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50014      fi
50015    fi
50016  fi
50017
50018      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50019$as_echo_n "checking for $DLL_NAME... " >&6; }
50020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50021$as_echo "$MSVC_DLL" >&6; }
50022    else
50023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50024$as_echo "incorrect, ignoring" >&6; }
50025      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50026$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50027    fi
50028  fi
50029
50030    fi
50031  fi
50032
50033  if test "x$MSVC_DLL" = x; then
50034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50035$as_echo_n "checking for $DLL_NAME... " >&6; }
50036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50037$as_echo "no" >&6; }
50038    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50039  fi
50040
50041    MSVCR_DLL="$MSVC_DLL"
50042  fi
50043
50044
50045
50046# Check whether --with-msvcp-dll was given.
50047if test "${with_msvcp_dll+set}" = set; then :
50048  withval=$with_msvcp_dll;
50049fi
50050
50051
50052  if test "x$MSVCP_NAME" != "x"; then
50053    if test "x$with_msvcp_dll" != x; then
50054      # If given explicitely by user, do not probe. If not present, fail directly.
50055
50056  DLL_NAME="$MSVCP_NAME"
50057  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50058  METHOD="--with-msvcp-dll"
50059  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50060    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50061$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50062
50063    # Need to check if the found msvcr is correct architecture
50064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50065$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50066    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50068      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50069      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50070      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50071        CORRECT_MSVCR_ARCH="PE32 executable"
50072      else
50073        CORRECT_MSVCR_ARCH="PE32+ executable"
50074      fi
50075    else
50076      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50077        CORRECT_MSVCR_ARCH=386
50078      else
50079        CORRECT_MSVCR_ARCH=x86-64
50080      fi
50081    fi
50082    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50084$as_echo "ok" >&6; }
50085      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50086
50087  # Only process if variable expands to non-empty
50088
50089  if test "x$MSVC_DLL" != x; then
50090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50091
50092  # Input might be given as Windows format, start by converting to
50093  # unix format.
50094  path="$MSVC_DLL"
50095  new_path=`$CYGPATH -u "$path"`
50096
50097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50100  # "foo.exe" is OK but "foo" is an error.
50101  #
50102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50103  # It is also a way to make sure we got the proper file name for the real test later on.
50104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50105  if test "x$test_shortpath" = x; then
50106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50107$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50108    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50109  fi
50110
50111  # Call helper function which possibly converts this using DOS-style short mode.
50112  # If so, the updated path is stored in $new_path.
50113
50114  input_path="$new_path"
50115  # Check if we need to convert this using DOS-style short mode. If the path
50116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50117  # take no chances and rewrite it.
50118  # Note: m4 eats our [], so we need to use [ and ] instead.
50119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50120  if test "x$has_forbidden_chars" != x; then
50121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50125      # Going to short mode and back again did indeed matter. Since short mode is
50126      # case insensitive, let's make it lowercase to improve readability.
50127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50128      # Now convert it back to Unix-style (cygpath)
50129      input_path=`$CYGPATH -u "$shortmode_path"`
50130      new_path="$input_path"
50131    fi
50132  fi
50133
50134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50135  if test "x$test_cygdrive_prefix" = x; then
50136    # As a simple fix, exclude /usr/bin since it's not a real path.
50137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50139      # a path prefixed by /cygdrive for fixpath to work.
50140      new_path="$CYGWIN_ROOT_PATH$input_path"
50141    fi
50142  fi
50143
50144
50145  if test "x$path" != "x$new_path"; then
50146    MSVC_DLL="$new_path"
50147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50148$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50149  fi
50150
50151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50152
50153  path="$MSVC_DLL"
50154  has_colon=`$ECHO $path | $GREP ^.:`
50155  new_path="$path"
50156  if test "x$has_colon" = x; then
50157    # Not in mixed or Windows style, start by that.
50158    new_path=`cmd //c echo $path`
50159  fi
50160
50161
50162  input_path="$new_path"
50163  # Check if we need to convert this using DOS-style short mode. If the path
50164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50165  # take no chances and rewrite it.
50166  # Note: m4 eats our [], so we need to use [ and ] instead.
50167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50168  if test "x$has_forbidden_chars" != x; then
50169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50171  fi
50172
50173
50174  windows_path="$new_path"
50175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50176    unix_path=`$CYGPATH -u "$windows_path"`
50177    new_path="$unix_path"
50178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50180    new_path="$unix_path"
50181  fi
50182
50183  if test "x$path" != "x$new_path"; then
50184    MSVC_DLL="$new_path"
50185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50186$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50187  fi
50188
50189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50191
50192    else
50193      # We're on a unix platform. Hooray! :)
50194      path="$MSVC_DLL"
50195      has_space=`$ECHO "$path" | $GREP " "`
50196      if test "x$has_space" != x; then
50197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50198$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50200      fi
50201
50202      # Use eval to expand a potential ~
50203      eval path="$path"
50204      if test ! -f "$path" && test ! -d "$path"; then
50205        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50206      fi
50207
50208      if test -d "$path"; then
50209        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50210      else
50211        dir="`$DIRNAME "$path"`"
50212        base="`$BASENAME "$path"`"
50213        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50214      fi
50215    fi
50216  fi
50217
50218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50219$as_echo_n "checking for $DLL_NAME... " >&6; }
50220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50221$as_echo "$MSVC_DLL" >&6; }
50222    else
50223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50224$as_echo "incorrect, ignoring" >&6; }
50225      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50226$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50227    fi
50228  fi
50229
50230      if test "x$MSVC_DLL" = x; then
50231        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50232      fi
50233      MSVCP_DLL="$MSVC_DLL"
50234    elif test "x$DEVKIT_MSVCP_DLL" != x; then
50235
50236  DLL_NAME="$MSVCP_NAME"
50237  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50238  METHOD="devkit"
50239  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50240    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50241$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50242
50243    # Need to check if the found msvcr is correct architecture
50244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50245$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50246    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50248      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50249      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50250      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50251        CORRECT_MSVCR_ARCH="PE32 executable"
50252      else
50253        CORRECT_MSVCR_ARCH="PE32+ executable"
50254      fi
50255    else
50256      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50257        CORRECT_MSVCR_ARCH=386
50258      else
50259        CORRECT_MSVCR_ARCH=x86-64
50260      fi
50261    fi
50262    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50263      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50264$as_echo "ok" >&6; }
50265      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50266
50267  # Only process if variable expands to non-empty
50268
50269  if test "x$MSVC_DLL" != x; then
50270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50271
50272  # Input might be given as Windows format, start by converting to
50273  # unix format.
50274  path="$MSVC_DLL"
50275  new_path=`$CYGPATH -u "$path"`
50276
50277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50280  # "foo.exe" is OK but "foo" is an error.
50281  #
50282  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50283  # It is also a way to make sure we got the proper file name for the real test later on.
50284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50285  if test "x$test_shortpath" = x; then
50286    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50287$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50288    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50289  fi
50290
50291  # Call helper function which possibly converts this using DOS-style short mode.
50292  # If so, the updated path is stored in $new_path.
50293
50294  input_path="$new_path"
50295  # Check if we need to convert this using DOS-style short mode. If the path
50296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50297  # take no chances and rewrite it.
50298  # Note: m4 eats our [], so we need to use [ and ] instead.
50299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50300  if test "x$has_forbidden_chars" != x; then
50301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50305      # Going to short mode and back again did indeed matter. Since short mode is
50306      # case insensitive, let's make it lowercase to improve readability.
50307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50308      # Now convert it back to Unix-style (cygpath)
50309      input_path=`$CYGPATH -u "$shortmode_path"`
50310      new_path="$input_path"
50311    fi
50312  fi
50313
50314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50315  if test "x$test_cygdrive_prefix" = x; then
50316    # As a simple fix, exclude /usr/bin since it's not a real path.
50317    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50319      # a path prefixed by /cygdrive for fixpath to work.
50320      new_path="$CYGWIN_ROOT_PATH$input_path"
50321    fi
50322  fi
50323
50324
50325  if test "x$path" != "x$new_path"; then
50326    MSVC_DLL="$new_path"
50327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50328$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50329  fi
50330
50331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50332
50333  path="$MSVC_DLL"
50334  has_colon=`$ECHO $path | $GREP ^.:`
50335  new_path="$path"
50336  if test "x$has_colon" = x; then
50337    # Not in mixed or Windows style, start by that.
50338    new_path=`cmd //c echo $path`
50339  fi
50340
50341
50342  input_path="$new_path"
50343  # Check if we need to convert this using DOS-style short mode. If the path
50344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50345  # take no chances and rewrite it.
50346  # Note: m4 eats our [], so we need to use [ and ] instead.
50347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50348  if test "x$has_forbidden_chars" != x; then
50349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50351  fi
50352
50353
50354  windows_path="$new_path"
50355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50356    unix_path=`$CYGPATH -u "$windows_path"`
50357    new_path="$unix_path"
50358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50360    new_path="$unix_path"
50361  fi
50362
50363  if test "x$path" != "x$new_path"; then
50364    MSVC_DLL="$new_path"
50365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50366$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50367  fi
50368
50369  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50370  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50371
50372    else
50373      # We're on a unix platform. Hooray! :)
50374      path="$MSVC_DLL"
50375      has_space=`$ECHO "$path" | $GREP " "`
50376      if test "x$has_space" != x; then
50377        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50378$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50379        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50380      fi
50381
50382      # Use eval to expand a potential ~
50383      eval path="$path"
50384      if test ! -f "$path" && test ! -d "$path"; then
50385        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50386      fi
50387
50388      if test -d "$path"; then
50389        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50390      else
50391        dir="`$DIRNAME "$path"`"
50392        base="`$BASENAME "$path"`"
50393        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50394      fi
50395    fi
50396  fi
50397
50398      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50399$as_echo_n "checking for $DLL_NAME... " >&6; }
50400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50401$as_echo "$MSVC_DLL" >&6; }
50402    else
50403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50404$as_echo "incorrect, ignoring" >&6; }
50405      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50406$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50407    fi
50408  fi
50409
50410      if test "x$MSVC_DLL" = x; then
50411        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
50412      fi
50413      MSVCP_DLL="$MSVC_DLL"
50414    else
50415
50416  DLL_NAME="${MSVCP_NAME}"
50417  MSVC_DLL=
50418
50419  if test "x$MSVC_DLL" = x; then
50420    # Probe: Using well-known location from Visual Studio 10.0
50421    if test "x$VCINSTALLDIR" != x; then
50422      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50423
50424  windows_path="$CYGWIN_VC_INSTALL_DIR"
50425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50426    unix_path=`$CYGPATH -u "$windows_path"`
50427    CYGWIN_VC_INSTALL_DIR="$unix_path"
50428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50430    CYGWIN_VC_INSTALL_DIR="$unix_path"
50431  fi
50432
50433      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50434        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50435      else
50436        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50437      fi
50438      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50439
50440  DLL_NAME="$DLL_NAME"
50441  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50442  METHOD="well-known location in VCINSTALLDIR"
50443  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50444    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50445$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50446
50447    # Need to check if the found msvcr is correct architecture
50448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50449$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50450    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50452      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50453      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50454      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50455        CORRECT_MSVCR_ARCH="PE32 executable"
50456      else
50457        CORRECT_MSVCR_ARCH="PE32+ executable"
50458      fi
50459    else
50460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50461        CORRECT_MSVCR_ARCH=386
50462      else
50463        CORRECT_MSVCR_ARCH=x86-64
50464      fi
50465    fi
50466    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50468$as_echo "ok" >&6; }
50469      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50470
50471  # Only process if variable expands to non-empty
50472
50473  if test "x$MSVC_DLL" != x; then
50474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50475
50476  # Input might be given as Windows format, start by converting to
50477  # unix format.
50478  path="$MSVC_DLL"
50479  new_path=`$CYGPATH -u "$path"`
50480
50481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50484  # "foo.exe" is OK but "foo" is an error.
50485  #
50486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50487  # It is also a way to make sure we got the proper file name for the real test later on.
50488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50489  if test "x$test_shortpath" = x; then
50490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50491$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50492    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50493  fi
50494
50495  # Call helper function which possibly converts this using DOS-style short mode.
50496  # If so, the updated path is stored in $new_path.
50497
50498  input_path="$new_path"
50499  # Check if we need to convert this using DOS-style short mode. If the path
50500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50501  # take no chances and rewrite it.
50502  # Note: m4 eats our [], so we need to use [ and ] instead.
50503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50504  if test "x$has_forbidden_chars" != x; then
50505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50509      # Going to short mode and back again did indeed matter. Since short mode is
50510      # case insensitive, let's make it lowercase to improve readability.
50511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50512      # Now convert it back to Unix-style (cygpath)
50513      input_path=`$CYGPATH -u "$shortmode_path"`
50514      new_path="$input_path"
50515    fi
50516  fi
50517
50518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50519  if test "x$test_cygdrive_prefix" = x; then
50520    # As a simple fix, exclude /usr/bin since it's not a real path.
50521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50523      # a path prefixed by /cygdrive for fixpath to work.
50524      new_path="$CYGWIN_ROOT_PATH$input_path"
50525    fi
50526  fi
50527
50528
50529  if test "x$path" != "x$new_path"; then
50530    MSVC_DLL="$new_path"
50531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50532$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50533  fi
50534
50535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50536
50537  path="$MSVC_DLL"
50538  has_colon=`$ECHO $path | $GREP ^.:`
50539  new_path="$path"
50540  if test "x$has_colon" = x; then
50541    # Not in mixed or Windows style, start by that.
50542    new_path=`cmd //c echo $path`
50543  fi
50544
50545
50546  input_path="$new_path"
50547  # Check if we need to convert this using DOS-style short mode. If the path
50548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50549  # take no chances and rewrite it.
50550  # Note: m4 eats our [], so we need to use [ and ] instead.
50551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50552  if test "x$has_forbidden_chars" != x; then
50553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50555  fi
50556
50557
50558  windows_path="$new_path"
50559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50560    unix_path=`$CYGPATH -u "$windows_path"`
50561    new_path="$unix_path"
50562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50564    new_path="$unix_path"
50565  fi
50566
50567  if test "x$path" != "x$new_path"; then
50568    MSVC_DLL="$new_path"
50569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50570$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50571  fi
50572
50573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50575
50576    else
50577      # We're on a unix platform. Hooray! :)
50578      path="$MSVC_DLL"
50579      has_space=`$ECHO "$path" | $GREP " "`
50580      if test "x$has_space" != x; then
50581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50582$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50584      fi
50585
50586      # Use eval to expand a potential ~
50587      eval path="$path"
50588      if test ! -f "$path" && test ! -d "$path"; then
50589        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50590      fi
50591
50592      if test -d "$path"; then
50593        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50594      else
50595        dir="`$DIRNAME "$path"`"
50596        base="`$BASENAME "$path"`"
50597        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50598      fi
50599    fi
50600  fi
50601
50602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50603$as_echo_n "checking for $DLL_NAME... " >&6; }
50604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50605$as_echo "$MSVC_DLL" >&6; }
50606    else
50607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50608$as_echo "incorrect, ignoring" >&6; }
50609      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50610$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50611    fi
50612  fi
50613
50614    fi
50615  fi
50616
50617  if test "x$MSVC_DLL" = x; then
50618    # Probe: Check in the Boot JDK directory.
50619    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50620
50621  DLL_NAME="$DLL_NAME"
50622  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50623  METHOD="well-known location in Boot JDK"
50624  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50625    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50626$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50627
50628    # Need to check if the found msvcr is correct architecture
50629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50630$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50631    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50633      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50634      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50635      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50636        CORRECT_MSVCR_ARCH="PE32 executable"
50637      else
50638        CORRECT_MSVCR_ARCH="PE32+ executable"
50639      fi
50640    else
50641      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50642        CORRECT_MSVCR_ARCH=386
50643      else
50644        CORRECT_MSVCR_ARCH=x86-64
50645      fi
50646    fi
50647    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50649$as_echo "ok" >&6; }
50650      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50651
50652  # Only process if variable expands to non-empty
50653
50654  if test "x$MSVC_DLL" != x; then
50655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50656
50657  # Input might be given as Windows format, start by converting to
50658  # unix format.
50659  path="$MSVC_DLL"
50660  new_path=`$CYGPATH -u "$path"`
50661
50662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50665  # "foo.exe" is OK but "foo" is an error.
50666  #
50667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50668  # It is also a way to make sure we got the proper file name for the real test later on.
50669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50670  if test "x$test_shortpath" = x; then
50671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50672$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50673    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50674  fi
50675
50676  # Call helper function which possibly converts this using DOS-style short mode.
50677  # If so, the updated path is stored in $new_path.
50678
50679  input_path="$new_path"
50680  # Check if we need to convert this using DOS-style short mode. If the path
50681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50682  # take no chances and rewrite it.
50683  # Note: m4 eats our [], so we need to use [ and ] instead.
50684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50685  if test "x$has_forbidden_chars" != x; then
50686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50690      # Going to short mode and back again did indeed matter. Since short mode is
50691      # case insensitive, let's make it lowercase to improve readability.
50692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50693      # Now convert it back to Unix-style (cygpath)
50694      input_path=`$CYGPATH -u "$shortmode_path"`
50695      new_path="$input_path"
50696    fi
50697  fi
50698
50699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50700  if test "x$test_cygdrive_prefix" = x; then
50701    # As a simple fix, exclude /usr/bin since it's not a real path.
50702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50704      # a path prefixed by /cygdrive for fixpath to work.
50705      new_path="$CYGWIN_ROOT_PATH$input_path"
50706    fi
50707  fi
50708
50709
50710  if test "x$path" != "x$new_path"; then
50711    MSVC_DLL="$new_path"
50712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50713$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50714  fi
50715
50716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50717
50718  path="$MSVC_DLL"
50719  has_colon=`$ECHO $path | $GREP ^.:`
50720  new_path="$path"
50721  if test "x$has_colon" = x; then
50722    # Not in mixed or Windows style, start by that.
50723    new_path=`cmd //c echo $path`
50724  fi
50725
50726
50727  input_path="$new_path"
50728  # Check if we need to convert this using DOS-style short mode. If the path
50729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50730  # take no chances and rewrite it.
50731  # Note: m4 eats our [], so we need to use [ and ] instead.
50732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50733  if test "x$has_forbidden_chars" != x; then
50734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50736  fi
50737
50738
50739  windows_path="$new_path"
50740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50741    unix_path=`$CYGPATH -u "$windows_path"`
50742    new_path="$unix_path"
50743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50745    new_path="$unix_path"
50746  fi
50747
50748  if test "x$path" != "x$new_path"; then
50749    MSVC_DLL="$new_path"
50750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50751$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50752  fi
50753
50754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50756
50757    else
50758      # We're on a unix platform. Hooray! :)
50759      path="$MSVC_DLL"
50760      has_space=`$ECHO "$path" | $GREP " "`
50761      if test "x$has_space" != x; then
50762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50763$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50765      fi
50766
50767      # Use eval to expand a potential ~
50768      eval path="$path"
50769      if test ! -f "$path" && test ! -d "$path"; then
50770        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50771      fi
50772
50773      if test -d "$path"; then
50774        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50775      else
50776        dir="`$DIRNAME "$path"`"
50777        base="`$BASENAME "$path"`"
50778        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50779      fi
50780    fi
50781  fi
50782
50783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50784$as_echo_n "checking for $DLL_NAME... " >&6; }
50785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50786$as_echo "$MSVC_DLL" >&6; }
50787    else
50788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50789$as_echo "incorrect, ignoring" >&6; }
50790      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50791$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50792    fi
50793  fi
50794
50795  fi
50796
50797  if test "x$MSVC_DLL" = x; then
50798    # Probe: Look in the Windows system32 directory
50799    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50800
50801  windows_path="$CYGWIN_SYSTEMROOT"
50802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50803    unix_path=`$CYGPATH -u "$windows_path"`
50804    CYGWIN_SYSTEMROOT="$unix_path"
50805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50807    CYGWIN_SYSTEMROOT="$unix_path"
50808  fi
50809
50810    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50811
50812  DLL_NAME="$DLL_NAME"
50813  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50814  METHOD="well-known location in SYSTEMROOT"
50815  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50816    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50817$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50818
50819    # Need to check if the found msvcr is correct architecture
50820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50821$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50822    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50823    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50824      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50825      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50826      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50827        CORRECT_MSVCR_ARCH="PE32 executable"
50828      else
50829        CORRECT_MSVCR_ARCH="PE32+ executable"
50830      fi
50831    else
50832      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50833        CORRECT_MSVCR_ARCH=386
50834      else
50835        CORRECT_MSVCR_ARCH=x86-64
50836      fi
50837    fi
50838    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50840$as_echo "ok" >&6; }
50841      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50842
50843  # Only process if variable expands to non-empty
50844
50845  if test "x$MSVC_DLL" != x; then
50846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50847
50848  # Input might be given as Windows format, start by converting to
50849  # unix format.
50850  path="$MSVC_DLL"
50851  new_path=`$CYGPATH -u "$path"`
50852
50853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50856  # "foo.exe" is OK but "foo" is an error.
50857  #
50858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50859  # It is also a way to make sure we got the proper file name for the real test later on.
50860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50861  if test "x$test_shortpath" = x; then
50862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50863$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50864    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50865  fi
50866
50867  # Call helper function which possibly converts this using DOS-style short mode.
50868  # If so, the updated path is stored in $new_path.
50869
50870  input_path="$new_path"
50871  # Check if we need to convert this using DOS-style short mode. If the path
50872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50873  # take no chances and rewrite it.
50874  # Note: m4 eats our [], so we need to use [ and ] instead.
50875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50876  if test "x$has_forbidden_chars" != x; then
50877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50881      # Going to short mode and back again did indeed matter. Since short mode is
50882      # case insensitive, let's make it lowercase to improve readability.
50883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50884      # Now convert it back to Unix-style (cygpath)
50885      input_path=`$CYGPATH -u "$shortmode_path"`
50886      new_path="$input_path"
50887    fi
50888  fi
50889
50890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50891  if test "x$test_cygdrive_prefix" = x; then
50892    # As a simple fix, exclude /usr/bin since it's not a real path.
50893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50895      # a path prefixed by /cygdrive for fixpath to work.
50896      new_path="$CYGWIN_ROOT_PATH$input_path"
50897    fi
50898  fi
50899
50900
50901  if test "x$path" != "x$new_path"; then
50902    MSVC_DLL="$new_path"
50903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50904$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50905  fi
50906
50907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50908
50909  path="$MSVC_DLL"
50910  has_colon=`$ECHO $path | $GREP ^.:`
50911  new_path="$path"
50912  if test "x$has_colon" = x; then
50913    # Not in mixed or Windows style, start by that.
50914    new_path=`cmd //c echo $path`
50915  fi
50916
50917
50918  input_path="$new_path"
50919  # Check if we need to convert this using DOS-style short mode. If the path
50920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50921  # take no chances and rewrite it.
50922  # Note: m4 eats our [], so we need to use [ and ] instead.
50923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50924  if test "x$has_forbidden_chars" != x; then
50925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50927  fi
50928
50929
50930  windows_path="$new_path"
50931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50932    unix_path=`$CYGPATH -u "$windows_path"`
50933    new_path="$unix_path"
50934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50936    new_path="$unix_path"
50937  fi
50938
50939  if test "x$path" != "x$new_path"; then
50940    MSVC_DLL="$new_path"
50941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50942$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50943  fi
50944
50945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50947
50948    else
50949      # We're on a unix platform. Hooray! :)
50950      path="$MSVC_DLL"
50951      has_space=`$ECHO "$path" | $GREP " "`
50952      if test "x$has_space" != x; then
50953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50954$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50956      fi
50957
50958      # Use eval to expand a potential ~
50959      eval path="$path"
50960      if test ! -f "$path" && test ! -d "$path"; then
50961        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50962      fi
50963
50964      if test -d "$path"; then
50965        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50966      else
50967        dir="`$DIRNAME "$path"`"
50968        base="`$BASENAME "$path"`"
50969        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50970      fi
50971    fi
50972  fi
50973
50974      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50975$as_echo_n "checking for $DLL_NAME... " >&6; }
50976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50977$as_echo "$MSVC_DLL" >&6; }
50978    else
50979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50980$as_echo "incorrect, ignoring" >&6; }
50981      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50982$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50983    fi
50984  fi
50985
50986  fi
50987
50988  if test "x$MSVC_DLL" = x; then
50989    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50990    if test "x$VS100COMNTOOLS" != x; then
50991      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50992
50993  windows_path="$CYGWIN_VS_TOOLS_DIR"
50994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50995    unix_path=`$CYGPATH -u "$windows_path"`
50996    CYGWIN_VS_TOOLS_DIR="$unix_path"
50997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50999    CYGWIN_VS_TOOLS_DIR="$unix_path"
51000  fi
51001
51002      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51003        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51004	    | $GREP -i /x64/ | $HEAD --lines 1`
51005      else
51006        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51007	    | $GREP -i /x86/ | $HEAD --lines 1`
51008      fi
51009
51010  DLL_NAME="$DLL_NAME"
51011  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51012  METHOD="search of VS100COMNTOOLS"
51013  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51014    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51015$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51016
51017    # Need to check if the found msvcr is correct architecture
51018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51019$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51020    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51022      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51023      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51024      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51025        CORRECT_MSVCR_ARCH="PE32 executable"
51026      else
51027        CORRECT_MSVCR_ARCH="PE32+ executable"
51028      fi
51029    else
51030      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51031        CORRECT_MSVCR_ARCH=386
51032      else
51033        CORRECT_MSVCR_ARCH=x86-64
51034      fi
51035    fi
51036    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51038$as_echo "ok" >&6; }
51039      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51040
51041  # Only process if variable expands to non-empty
51042
51043  if test "x$MSVC_DLL" != x; then
51044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51045
51046  # Input might be given as Windows format, start by converting to
51047  # unix format.
51048  path="$MSVC_DLL"
51049  new_path=`$CYGPATH -u "$path"`
51050
51051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51054  # "foo.exe" is OK but "foo" is an error.
51055  #
51056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51057  # It is also a way to make sure we got the proper file name for the real test later on.
51058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51059  if test "x$test_shortpath" = x; then
51060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51061$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51062    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51063  fi
51064
51065  # Call helper function which possibly converts this using DOS-style short mode.
51066  # If so, the updated path is stored in $new_path.
51067
51068  input_path="$new_path"
51069  # Check if we need to convert this using DOS-style short mode. If the path
51070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51071  # take no chances and rewrite it.
51072  # Note: m4 eats our [], so we need to use [ and ] instead.
51073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51074  if test "x$has_forbidden_chars" != x; then
51075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51079      # Going to short mode and back again did indeed matter. Since short mode is
51080      # case insensitive, let's make it lowercase to improve readability.
51081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51082      # Now convert it back to Unix-style (cygpath)
51083      input_path=`$CYGPATH -u "$shortmode_path"`
51084      new_path="$input_path"
51085    fi
51086  fi
51087
51088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51089  if test "x$test_cygdrive_prefix" = x; then
51090    # As a simple fix, exclude /usr/bin since it's not a real path.
51091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51093      # a path prefixed by /cygdrive for fixpath to work.
51094      new_path="$CYGWIN_ROOT_PATH$input_path"
51095    fi
51096  fi
51097
51098
51099  if test "x$path" != "x$new_path"; then
51100    MSVC_DLL="$new_path"
51101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51102$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51103  fi
51104
51105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51106
51107  path="$MSVC_DLL"
51108  has_colon=`$ECHO $path | $GREP ^.:`
51109  new_path="$path"
51110  if test "x$has_colon" = x; then
51111    # Not in mixed or Windows style, start by that.
51112    new_path=`cmd //c echo $path`
51113  fi
51114
51115
51116  input_path="$new_path"
51117  # Check if we need to convert this using DOS-style short mode. If the path
51118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51119  # take no chances and rewrite it.
51120  # Note: m4 eats our [], so we need to use [ and ] instead.
51121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51122  if test "x$has_forbidden_chars" != x; then
51123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51125  fi
51126
51127
51128  windows_path="$new_path"
51129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51130    unix_path=`$CYGPATH -u "$windows_path"`
51131    new_path="$unix_path"
51132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51134    new_path="$unix_path"
51135  fi
51136
51137  if test "x$path" != "x$new_path"; then
51138    MSVC_DLL="$new_path"
51139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51140$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51141  fi
51142
51143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51145
51146    else
51147      # We're on a unix platform. Hooray! :)
51148      path="$MSVC_DLL"
51149      has_space=`$ECHO "$path" | $GREP " "`
51150      if test "x$has_space" != x; then
51151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51152$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51154      fi
51155
51156      # Use eval to expand a potential ~
51157      eval path="$path"
51158      if test ! -f "$path" && test ! -d "$path"; then
51159        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51160      fi
51161
51162      if test -d "$path"; then
51163        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51164      else
51165        dir="`$DIRNAME "$path"`"
51166        base="`$BASENAME "$path"`"
51167        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51168      fi
51169    fi
51170  fi
51171
51172      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51173$as_echo_n "checking for $DLL_NAME... " >&6; }
51174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51175$as_echo "$MSVC_DLL" >&6; }
51176    else
51177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51178$as_echo "incorrect, ignoring" >&6; }
51179      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51180$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51181    fi
51182  fi
51183
51184    fi
51185  fi
51186
51187  if test "x$MSVC_DLL" = x; then
51188    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51189    # (This was the original behaviour; kept since it might turn something up)
51190    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51191      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51192        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51193	    | $GREP x64 | $HEAD --lines 1`
51194      else
51195        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51196	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51197        if test "x$POSSIBLE_MSVC_DLL" = x; then
51198          # We're grasping at straws now...
51199          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51200	      | $HEAD --lines 1`
51201        fi
51202      fi
51203
51204
51205  DLL_NAME="$DLL_NAME"
51206  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51207  METHOD="search of VCINSTALLDIR"
51208  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51209    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51210$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51211
51212    # Need to check if the found msvcr is correct architecture
51213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51214$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51215    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51217      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51218      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51219      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51220        CORRECT_MSVCR_ARCH="PE32 executable"
51221      else
51222        CORRECT_MSVCR_ARCH="PE32+ executable"
51223      fi
51224    else
51225      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51226        CORRECT_MSVCR_ARCH=386
51227      else
51228        CORRECT_MSVCR_ARCH=x86-64
51229      fi
51230    fi
51231    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51233$as_echo "ok" >&6; }
51234      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51235
51236  # Only process if variable expands to non-empty
51237
51238  if test "x$MSVC_DLL" != x; then
51239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51240
51241  # Input might be given as Windows format, start by converting to
51242  # unix format.
51243  path="$MSVC_DLL"
51244  new_path=`$CYGPATH -u "$path"`
51245
51246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51249  # "foo.exe" is OK but "foo" is an error.
51250  #
51251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51252  # It is also a way to make sure we got the proper file name for the real test later on.
51253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51254  if test "x$test_shortpath" = x; then
51255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51256$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51257    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51258  fi
51259
51260  # Call helper function which possibly converts this using DOS-style short mode.
51261  # If so, the updated path is stored in $new_path.
51262
51263  input_path="$new_path"
51264  # Check if we need to convert this using DOS-style short mode. If the path
51265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51266  # take no chances and rewrite it.
51267  # Note: m4 eats our [], so we need to use [ and ] instead.
51268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51269  if test "x$has_forbidden_chars" != x; then
51270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51274      # Going to short mode and back again did indeed matter. Since short mode is
51275      # case insensitive, let's make it lowercase to improve readability.
51276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51277      # Now convert it back to Unix-style (cygpath)
51278      input_path=`$CYGPATH -u "$shortmode_path"`
51279      new_path="$input_path"
51280    fi
51281  fi
51282
51283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51284  if test "x$test_cygdrive_prefix" = x; then
51285    # As a simple fix, exclude /usr/bin since it's not a real path.
51286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51288      # a path prefixed by /cygdrive for fixpath to work.
51289      new_path="$CYGWIN_ROOT_PATH$input_path"
51290    fi
51291  fi
51292
51293
51294  if test "x$path" != "x$new_path"; then
51295    MSVC_DLL="$new_path"
51296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51297$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51298  fi
51299
51300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51301
51302  path="$MSVC_DLL"
51303  has_colon=`$ECHO $path | $GREP ^.:`
51304  new_path="$path"
51305  if test "x$has_colon" = x; then
51306    # Not in mixed or Windows style, start by that.
51307    new_path=`cmd //c echo $path`
51308  fi
51309
51310
51311  input_path="$new_path"
51312  # Check if we need to convert this using DOS-style short mode. If the path
51313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51314  # take no chances and rewrite it.
51315  # Note: m4 eats our [], so we need to use [ and ] instead.
51316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51317  if test "x$has_forbidden_chars" != x; then
51318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51320  fi
51321
51322
51323  windows_path="$new_path"
51324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51325    unix_path=`$CYGPATH -u "$windows_path"`
51326    new_path="$unix_path"
51327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51329    new_path="$unix_path"
51330  fi
51331
51332  if test "x$path" != "x$new_path"; then
51333    MSVC_DLL="$new_path"
51334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51335$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51336  fi
51337
51338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51340
51341    else
51342      # We're on a unix platform. Hooray! :)
51343      path="$MSVC_DLL"
51344      has_space=`$ECHO "$path" | $GREP " "`
51345      if test "x$has_space" != x; then
51346        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51347$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51348        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51349      fi
51350
51351      # Use eval to expand a potential ~
51352      eval path="$path"
51353      if test ! -f "$path" && test ! -d "$path"; then
51354        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51355      fi
51356
51357      if test -d "$path"; then
51358        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51359      else
51360        dir="`$DIRNAME "$path"`"
51361        base="`$BASENAME "$path"`"
51362        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
51363      fi
51364    fi
51365  fi
51366
51367      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51368$as_echo_n "checking for $DLL_NAME... " >&6; }
51369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51370$as_echo "$MSVC_DLL" >&6; }
51371    else
51372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51373$as_echo "incorrect, ignoring" >&6; }
51374      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51375$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51376    fi
51377  fi
51378
51379    fi
51380  fi
51381
51382  if test "x$MSVC_DLL" = x; then
51383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51384$as_echo_n "checking for $DLL_NAME... " >&6; }
51385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51386$as_echo "no" >&6; }
51387    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51388  fi
51389
51390      MSVCP_DLL="$MSVC_DLL"
51391    fi
51392
51393  fi
51394
51395  fi
51396
51397
51398  if test "x$NEEDS_LIB_X11" = xfalse; then
51399    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
51400      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
51401$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
51402    fi
51403    X_CFLAGS=
51404    X_LIBS=
51405  else
51406
51407    if test "x${with_x}" = xno; then
51408      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
51409    fi
51410
51411    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
51412      # The user has specified a X11 base directory. Use it for includes and
51413      # libraries, unless explicitely overridden.
51414      if test "x$x_includes" = xNONE; then
51415        x_includes="${with_x}/include"
51416      fi
51417      if test "x$x_libraries" = xNONE; then
51418        x_libraries="${with_x}/lib"
51419      fi
51420    else
51421      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
51422      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
51423      # --x-libraries for the sysroot, if that seems to be correct.
51424      if test "x$SYSROOT" != "x"; then
51425        if test "x$x_includes" = xNONE; then
51426          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
51427            x_includes="$SYSROOT/usr/X11R6/include"
51428          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
51429            x_includes="$SYSROOT/usr/include"
51430          fi
51431        fi
51432        if test "x$x_libraries" = xNONE; then
51433          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
51434            x_libraries="$SYSROOT/usr/X11R6/lib"
51435          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51436            x_libraries="$SYSROOT/usr/lib64"
51437          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
51438            x_libraries="$SYSROOT/usr/lib"
51439          fi
51440        fi
51441      fi
51442    fi
51443
51444    # Now let autoconf do it's magic
51445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
51446$as_echo_n "checking for X... " >&6; }
51447
51448
51449# Check whether --with-x was given.
51450if test "${with_x+set}" = set; then :
51451  withval=$with_x;
51452fi
51453
51454# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
51455if test "x$with_x" = xno; then
51456  # The user explicitly disabled X.
51457  have_x=disabled
51458else
51459  case $x_includes,$x_libraries in #(
51460    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
51461    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
51462  $as_echo_n "(cached) " >&6
51463else
51464  # One or both of the vars are not set, and there is no cached value.
51465ac_x_includes=no ac_x_libraries=no
51466rm -f -r conftest.dir
51467if mkdir conftest.dir; then
51468  cd conftest.dir
51469  cat >Imakefile <<'_ACEOF'
51470incroot:
51471	@echo incroot='${INCROOT}'
51472usrlibdir:
51473	@echo usrlibdir='${USRLIBDIR}'
51474libdir:
51475	@echo libdir='${LIBDIR}'
51476_ACEOF
51477  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
51478    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
51479    for ac_var in incroot usrlibdir libdir; do
51480      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
51481    done
51482    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
51483    for ac_extension in a so sl dylib la dll; do
51484      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
51485	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
51486	ac_im_usrlibdir=$ac_im_libdir; break
51487      fi
51488    done
51489    # Screen out bogus values from the imake configuration.  They are
51490    # bogus both because they are the default anyway, and because
51491    # using them would break gcc on systems where it needs fixed includes.
51492    case $ac_im_incroot in
51493	/usr/include) ac_x_includes= ;;
51494	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
51495    esac
51496    case $ac_im_usrlibdir in
51497	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
51498	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
51499    esac
51500  fi
51501  cd ..
51502  rm -f -r conftest.dir
51503fi
51504
51505# Standard set of common directories for X headers.
51506# Check X11 before X11Rn because it is often a symlink to the current release.
51507ac_x_header_dirs='
51508/usr/X11/include
51509/usr/X11R7/include
51510/usr/X11R6/include
51511/usr/X11R5/include
51512/usr/X11R4/include
51513
51514/usr/include/X11
51515/usr/include/X11R7
51516/usr/include/X11R6
51517/usr/include/X11R5
51518/usr/include/X11R4
51519
51520/usr/local/X11/include
51521/usr/local/X11R7/include
51522/usr/local/X11R6/include
51523/usr/local/X11R5/include
51524/usr/local/X11R4/include
51525
51526/usr/local/include/X11
51527/usr/local/include/X11R7
51528/usr/local/include/X11R6
51529/usr/local/include/X11R5
51530/usr/local/include/X11R4
51531
51532/usr/X386/include
51533/usr/x386/include
51534/usr/XFree86/include/X11
51535
51536/usr/include
51537/usr/local/include
51538/usr/unsupported/include
51539/usr/athena/include
51540/usr/local/x11r5/include
51541/usr/lpp/Xamples/include
51542
51543/usr/openwin/include
51544/usr/openwin/share/include'
51545
51546if test "$ac_x_includes" = no; then
51547  # Guess where to find include files, by looking for Xlib.h.
51548  # First, try using that file with no special directory specified.
51549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51550/* end confdefs.h.  */
51551#include <X11/Xlib.h>
51552_ACEOF
51553if ac_fn_cxx_try_cpp "$LINENO"; then :
51554  # We can compile using X headers with no special include directory.
51555ac_x_includes=
51556else
51557  for ac_dir in $ac_x_header_dirs; do
51558  if test -r "$ac_dir/X11/Xlib.h"; then
51559    ac_x_includes=$ac_dir
51560    break
51561  fi
51562done
51563fi
51564rm -f conftest.err conftest.i conftest.$ac_ext
51565fi # $ac_x_includes = no
51566
51567if test "$ac_x_libraries" = no; then
51568  # Check for the libraries.
51569  # See if we find them without any special options.
51570  # Don't add to $LIBS permanently.
51571  ac_save_LIBS=$LIBS
51572  LIBS="-lX11 $LIBS"
51573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51574/* end confdefs.h.  */
51575#include <X11/Xlib.h>
51576int
51577main ()
51578{
51579XrmInitialize ()
51580  ;
51581  return 0;
51582}
51583_ACEOF
51584if ac_fn_cxx_try_link "$LINENO"; then :
51585  LIBS=$ac_save_LIBS
51586# We can link X programs with no special library path.
51587ac_x_libraries=
51588else
51589  LIBS=$ac_save_LIBS
51590for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
51591do
51592  # Don't even attempt the hair of trying to link an X program!
51593  for ac_extension in a so sl dylib la dll; do
51594    if test -r "$ac_dir/libX11.$ac_extension"; then
51595      ac_x_libraries=$ac_dir
51596      break 2
51597    fi
51598  done
51599done
51600fi
51601rm -f core conftest.err conftest.$ac_objext \
51602    conftest$ac_exeext conftest.$ac_ext
51603fi # $ac_x_libraries = no
51604
51605case $ac_x_includes,$ac_x_libraries in #(
51606  no,* | *,no | *\'*)
51607    # Didn't find X, or a directory has "'" in its name.
51608    ac_cv_have_x="have_x=no";; #(
51609  *)
51610    # Record where we found X for the cache.
51611    ac_cv_have_x="have_x=yes\
51612	ac_x_includes='$ac_x_includes'\
51613	ac_x_libraries='$ac_x_libraries'"
51614esac
51615fi
51616;; #(
51617    *) have_x=yes;;
51618  esac
51619  eval "$ac_cv_have_x"
51620fi # $with_x != no
51621
51622if test "$have_x" != yes; then
51623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
51624$as_echo "$have_x" >&6; }
51625  no_x=yes
51626else
51627  # If each of the values was on the command line, it overrides each guess.
51628  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
51629  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
51630  # Update the cache value to reflect the command line values.
51631  ac_cv_have_x="have_x=yes\
51632	ac_x_includes='$x_includes'\
51633	ac_x_libraries='$x_libraries'"
51634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
51635$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
51636fi
51637
51638    if test "$no_x" = yes; then
51639  # Not all programs may use this symbol, but it does not hurt to define it.
51640
51641$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
51642
51643  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
51644else
51645  if test -n "$x_includes"; then
51646    X_CFLAGS="$X_CFLAGS -I$x_includes"
51647  fi
51648
51649  # It would also be nice to do this for all -L options, not just this one.
51650  if test -n "$x_libraries"; then
51651    X_LIBS="$X_LIBS -L$x_libraries"
51652    # For Solaris; some versions of Sun CC require a space after -R and
51653    # others require no space.  Words are not sufficient . . . .
51654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
51655$as_echo_n "checking whether -R must be followed by a space... " >&6; }
51656    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
51657    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
51658    ac_cxx_werror_flag=yes
51659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51660/* end confdefs.h.  */
51661
51662int
51663main ()
51664{
51665
51666  ;
51667  return 0;
51668}
51669_ACEOF
51670if ac_fn_cxx_try_link "$LINENO"; then :
51671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51672$as_echo "no" >&6; }
51673       X_LIBS="$X_LIBS -R$x_libraries"
51674else
51675  LIBS="$ac_xsave_LIBS -R $x_libraries"
51676       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51677/* end confdefs.h.  */
51678
51679int
51680main ()
51681{
51682
51683  ;
51684  return 0;
51685}
51686_ACEOF
51687if ac_fn_cxx_try_link "$LINENO"; then :
51688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51689$as_echo "yes" >&6; }
51690	  X_LIBS="$X_LIBS -R $x_libraries"
51691else
51692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
51693$as_echo "neither works" >&6; }
51694fi
51695rm -f core conftest.err conftest.$ac_objext \
51696    conftest$ac_exeext conftest.$ac_ext
51697fi
51698rm -f core conftest.err conftest.$ac_objext \
51699    conftest$ac_exeext conftest.$ac_ext
51700    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
51701    LIBS=$ac_xsave_LIBS
51702  fi
51703
51704  # Check for system-dependent libraries X programs must link with.
51705  # Do this before checking for the system-independent R6 libraries
51706  # (-lICE), since we may need -lsocket or whatever for X linking.
51707
51708  if test "$ISC" = yes; then
51709    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
51710  else
51711    # Martyn Johnson says this is needed for Ultrix, if the X
51712    # libraries were built with DECnet support.  And Karl Berry says
51713    # the Alpha needs dnet_stub (dnet does not exist).
51714    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
51715    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51716/* end confdefs.h.  */
51717
51718/* Override any GCC internal prototype to avoid an error.
51719   Use char because int might match the return type of a GCC
51720   builtin and then its argument prototype would still apply.  */
51721#ifdef __cplusplus
51722extern "C"
51723#endif
51724char XOpenDisplay ();
51725int
51726main ()
51727{
51728return XOpenDisplay ();
51729  ;
51730  return 0;
51731}
51732_ACEOF
51733if ac_fn_cxx_try_link "$LINENO"; then :
51734
51735else
51736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51737$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51738if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51739  $as_echo_n "(cached) " >&6
51740else
51741  ac_check_lib_save_LIBS=$LIBS
51742LIBS="-ldnet  $LIBS"
51743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51744/* end confdefs.h.  */
51745
51746/* Override any GCC internal prototype to avoid an error.
51747   Use char because int might match the return type of a GCC
51748   builtin and then its argument prototype would still apply.  */
51749#ifdef __cplusplus
51750extern "C"
51751#endif
51752char dnet_ntoa ();
51753int
51754main ()
51755{
51756return dnet_ntoa ();
51757  ;
51758  return 0;
51759}
51760_ACEOF
51761if ac_fn_cxx_try_link "$LINENO"; then :
51762  ac_cv_lib_dnet_dnet_ntoa=yes
51763else
51764  ac_cv_lib_dnet_dnet_ntoa=no
51765fi
51766rm -f core conftest.err conftest.$ac_objext \
51767    conftest$ac_exeext conftest.$ac_ext
51768LIBS=$ac_check_lib_save_LIBS
51769fi
51770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51771$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51772if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51773  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51774fi
51775
51776    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51778$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51779if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51780  $as_echo_n "(cached) " >&6
51781else
51782  ac_check_lib_save_LIBS=$LIBS
51783LIBS="-ldnet_stub  $LIBS"
51784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51785/* end confdefs.h.  */
51786
51787/* Override any GCC internal prototype to avoid an error.
51788   Use char because int might match the return type of a GCC
51789   builtin and then its argument prototype would still apply.  */
51790#ifdef __cplusplus
51791extern "C"
51792#endif
51793char dnet_ntoa ();
51794int
51795main ()
51796{
51797return dnet_ntoa ();
51798  ;
51799  return 0;
51800}
51801_ACEOF
51802if ac_fn_cxx_try_link "$LINENO"; then :
51803  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51804else
51805  ac_cv_lib_dnet_stub_dnet_ntoa=no
51806fi
51807rm -f core conftest.err conftest.$ac_objext \
51808    conftest$ac_exeext conftest.$ac_ext
51809LIBS=$ac_check_lib_save_LIBS
51810fi
51811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51812$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51813if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51814  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51815fi
51816
51817    fi
51818fi
51819rm -f core conftest.err conftest.$ac_objext \
51820    conftest$ac_exeext conftest.$ac_ext
51821    LIBS="$ac_xsave_LIBS"
51822
51823    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51824    # to get the SysV transport functions.
51825    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51826    # needs -lnsl.
51827    # The nsl library prevents programs from opening the X display
51828    # on Irix 5.2, according to T.E. Dickey.
51829    # The functions gethostbyname, getservbyname, and inet_addr are
51830    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51831    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51832if test "x$ac_cv_func_gethostbyname" = xyes; then :
51833
51834fi
51835
51836    if test $ac_cv_func_gethostbyname = no; then
51837      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51838$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51839if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51840  $as_echo_n "(cached) " >&6
51841else
51842  ac_check_lib_save_LIBS=$LIBS
51843LIBS="-lnsl  $LIBS"
51844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51845/* end confdefs.h.  */
51846
51847/* Override any GCC internal prototype to avoid an error.
51848   Use char because int might match the return type of a GCC
51849   builtin and then its argument prototype would still apply.  */
51850#ifdef __cplusplus
51851extern "C"
51852#endif
51853char gethostbyname ();
51854int
51855main ()
51856{
51857return gethostbyname ();
51858  ;
51859  return 0;
51860}
51861_ACEOF
51862if ac_fn_cxx_try_link "$LINENO"; then :
51863  ac_cv_lib_nsl_gethostbyname=yes
51864else
51865  ac_cv_lib_nsl_gethostbyname=no
51866fi
51867rm -f core conftest.err conftest.$ac_objext \
51868    conftest$ac_exeext conftest.$ac_ext
51869LIBS=$ac_check_lib_save_LIBS
51870fi
51871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51872$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51873if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51874  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51875fi
51876
51877      if test $ac_cv_lib_nsl_gethostbyname = no; then
51878	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51879$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51880if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51881  $as_echo_n "(cached) " >&6
51882else
51883  ac_check_lib_save_LIBS=$LIBS
51884LIBS="-lbsd  $LIBS"
51885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51886/* end confdefs.h.  */
51887
51888/* Override any GCC internal prototype to avoid an error.
51889   Use char because int might match the return type of a GCC
51890   builtin and then its argument prototype would still apply.  */
51891#ifdef __cplusplus
51892extern "C"
51893#endif
51894char gethostbyname ();
51895int
51896main ()
51897{
51898return gethostbyname ();
51899  ;
51900  return 0;
51901}
51902_ACEOF
51903if ac_fn_cxx_try_link "$LINENO"; then :
51904  ac_cv_lib_bsd_gethostbyname=yes
51905else
51906  ac_cv_lib_bsd_gethostbyname=no
51907fi
51908rm -f core conftest.err conftest.$ac_objext \
51909    conftest$ac_exeext conftest.$ac_ext
51910LIBS=$ac_check_lib_save_LIBS
51911fi
51912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51913$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51914if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51915  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51916fi
51917
51918      fi
51919    fi
51920
51921    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51922    # socket/setsockopt and other routines are undefined under SCO ODT
51923    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51924    # on later versions), says Simon Leinen: it contains gethostby*
51925    # variants that don't use the name server (or something).  -lsocket
51926    # must be given before -lnsl if both are needed.  We assume that
51927    # if connect needs -lnsl, so does gethostbyname.
51928    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51929if test "x$ac_cv_func_connect" = xyes; then :
51930
51931fi
51932
51933    if test $ac_cv_func_connect = no; then
51934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51935$as_echo_n "checking for connect in -lsocket... " >&6; }
51936if ${ac_cv_lib_socket_connect+:} false; then :
51937  $as_echo_n "(cached) " >&6
51938else
51939  ac_check_lib_save_LIBS=$LIBS
51940LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51942/* end confdefs.h.  */
51943
51944/* Override any GCC internal prototype to avoid an error.
51945   Use char because int might match the return type of a GCC
51946   builtin and then its argument prototype would still apply.  */
51947#ifdef __cplusplus
51948extern "C"
51949#endif
51950char connect ();
51951int
51952main ()
51953{
51954return connect ();
51955  ;
51956  return 0;
51957}
51958_ACEOF
51959if ac_fn_cxx_try_link "$LINENO"; then :
51960  ac_cv_lib_socket_connect=yes
51961else
51962  ac_cv_lib_socket_connect=no
51963fi
51964rm -f core conftest.err conftest.$ac_objext \
51965    conftest$ac_exeext conftest.$ac_ext
51966LIBS=$ac_check_lib_save_LIBS
51967fi
51968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51969$as_echo "$ac_cv_lib_socket_connect" >&6; }
51970if test "x$ac_cv_lib_socket_connect" = xyes; then :
51971  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51972fi
51973
51974    fi
51975
51976    # Guillermo Gomez says -lposix is necessary on A/UX.
51977    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51978if test "x$ac_cv_func_remove" = xyes; then :
51979
51980fi
51981
51982    if test $ac_cv_func_remove = no; then
51983      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51984$as_echo_n "checking for remove in -lposix... " >&6; }
51985if ${ac_cv_lib_posix_remove+:} false; then :
51986  $as_echo_n "(cached) " >&6
51987else
51988  ac_check_lib_save_LIBS=$LIBS
51989LIBS="-lposix  $LIBS"
51990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51991/* end confdefs.h.  */
51992
51993/* Override any GCC internal prototype to avoid an error.
51994   Use char because int might match the return type of a GCC
51995   builtin and then its argument prototype would still apply.  */
51996#ifdef __cplusplus
51997extern "C"
51998#endif
51999char remove ();
52000int
52001main ()
52002{
52003return remove ();
52004  ;
52005  return 0;
52006}
52007_ACEOF
52008if ac_fn_cxx_try_link "$LINENO"; then :
52009  ac_cv_lib_posix_remove=yes
52010else
52011  ac_cv_lib_posix_remove=no
52012fi
52013rm -f core conftest.err conftest.$ac_objext \
52014    conftest$ac_exeext conftest.$ac_ext
52015LIBS=$ac_check_lib_save_LIBS
52016fi
52017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
52018$as_echo "$ac_cv_lib_posix_remove" >&6; }
52019if test "x$ac_cv_lib_posix_remove" = xyes; then :
52020  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
52021fi
52022
52023    fi
52024
52025    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
52026    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
52027if test "x$ac_cv_func_shmat" = xyes; then :
52028
52029fi
52030
52031    if test $ac_cv_func_shmat = no; then
52032      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
52033$as_echo_n "checking for shmat in -lipc... " >&6; }
52034if ${ac_cv_lib_ipc_shmat+:} false; then :
52035  $as_echo_n "(cached) " >&6
52036else
52037  ac_check_lib_save_LIBS=$LIBS
52038LIBS="-lipc  $LIBS"
52039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52040/* end confdefs.h.  */
52041
52042/* Override any GCC internal prototype to avoid an error.
52043   Use char because int might match the return type of a GCC
52044   builtin and then its argument prototype would still apply.  */
52045#ifdef __cplusplus
52046extern "C"
52047#endif
52048char shmat ();
52049int
52050main ()
52051{
52052return shmat ();
52053  ;
52054  return 0;
52055}
52056_ACEOF
52057if ac_fn_cxx_try_link "$LINENO"; then :
52058  ac_cv_lib_ipc_shmat=yes
52059else
52060  ac_cv_lib_ipc_shmat=no
52061fi
52062rm -f core conftest.err conftest.$ac_objext \
52063    conftest$ac_exeext conftest.$ac_ext
52064LIBS=$ac_check_lib_save_LIBS
52065fi
52066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
52067$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
52068if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
52069  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
52070fi
52071
52072    fi
52073  fi
52074
52075  # Check for libraries that X11R6 Xt/Xaw programs need.
52076  ac_save_LDFLAGS=$LDFLAGS
52077  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
52078  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
52079  # check for ICE first), but we must link in the order -lSM -lICE or
52080  # we get undefined symbols.  So assume we have SM if we have ICE.
52081  # These have to be linked with before -lX11, unlike the other
52082  # libraries we check for below, so use a different variable.
52083  # John Interrante, Karl Berry
52084  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
52085$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
52086if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
52087  $as_echo_n "(cached) " >&6
52088else
52089  ac_check_lib_save_LIBS=$LIBS
52090LIBS="-lICE $X_EXTRA_LIBS $LIBS"
52091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52092/* end confdefs.h.  */
52093
52094/* Override any GCC internal prototype to avoid an error.
52095   Use char because int might match the return type of a GCC
52096   builtin and then its argument prototype would still apply.  */
52097#ifdef __cplusplus
52098extern "C"
52099#endif
52100char IceConnectionNumber ();
52101int
52102main ()
52103{
52104return IceConnectionNumber ();
52105  ;
52106  return 0;
52107}
52108_ACEOF
52109if ac_fn_cxx_try_link "$LINENO"; then :
52110  ac_cv_lib_ICE_IceConnectionNumber=yes
52111else
52112  ac_cv_lib_ICE_IceConnectionNumber=no
52113fi
52114rm -f core conftest.err conftest.$ac_objext \
52115    conftest$ac_exeext conftest.$ac_ext
52116LIBS=$ac_check_lib_save_LIBS
52117fi
52118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
52119$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
52120if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
52121  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
52122fi
52123
52124  LDFLAGS=$ac_save_LDFLAGS
52125
52126fi
52127
52128
52129    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
52130    # this doesn't make sense so we remove it.
52131    if test "x$COMPILE_TYPE" = xcross; then
52132      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
52133    fi
52134
52135    if test "x$no_x" = xyes; then
52136
52137  # Print a helpful message on how to acquire the necessary build dependency.
52138  # x11 is the help tag: freetype, cups, alsa etc
52139  MISSING_DEPENDENCY=x11
52140
52141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52142    cygwin_help $MISSING_DEPENDENCY
52143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52144    msys_help $MISSING_DEPENDENCY
52145  else
52146    PKGHANDLER_COMMAND=
52147
52148    case $PKGHANDLER in
52149      apt-get)
52150        apt_help     $MISSING_DEPENDENCY ;;
52151      yum)
52152        yum_help     $MISSING_DEPENDENCY ;;
52153      port)
52154        port_help    $MISSING_DEPENDENCY ;;
52155      pkgutil)
52156        pkgutil_help $MISSING_DEPENDENCY ;;
52157      pkgadd)
52158        pkgadd_help  $MISSING_DEPENDENCY ;;
52159    esac
52160
52161    if test "x$PKGHANDLER_COMMAND" != x; then
52162      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52163    fi
52164  fi
52165
52166      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
52167    fi
52168
52169    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52170      OPENWIN_HOME="/usr/openwin"
52171      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
52172      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52173          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
52174          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
52175          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
52176    fi
52177
52178    ac_ext=c
52179ac_cpp='$CPP $CPPFLAGS'
52180ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52181ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52182ac_compiler_gnu=$ac_cv_c_compiler_gnu
52183
52184    OLD_CFLAGS="$CFLAGS"
52185    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
52186
52187    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
52188    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
52189do :
52190  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
52191ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
52192          # include <X11/Xlib.h>
52193          # include <X11/Xutil.h>
52194
52195
52196"
52197if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
52198  cat >>confdefs.h <<_ACEOF
52199#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
52200_ACEOF
52201 X11_HEADERS_OK=yes
52202else
52203  X11_HEADERS_OK=no; break
52204fi
52205
52206done
52207
52208
52209    if test "x$X11_HEADERS_OK" = xno; then
52210
52211  # Print a helpful message on how to acquire the necessary build dependency.
52212  # x11 is the help tag: freetype, cups, alsa etc
52213  MISSING_DEPENDENCY=x11
52214
52215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52216    cygwin_help $MISSING_DEPENDENCY
52217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52218    msys_help $MISSING_DEPENDENCY
52219  else
52220    PKGHANDLER_COMMAND=
52221
52222    case $PKGHANDLER in
52223      apt-get)
52224        apt_help     $MISSING_DEPENDENCY ;;
52225      yum)
52226        yum_help     $MISSING_DEPENDENCY ;;
52227      port)
52228        port_help    $MISSING_DEPENDENCY ;;
52229      pkgutil)
52230        pkgutil_help $MISSING_DEPENDENCY ;;
52231      pkgadd)
52232        pkgadd_help  $MISSING_DEPENDENCY ;;
52233    esac
52234
52235    if test "x$PKGHANDLER_COMMAND" != x; then
52236      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52237    fi
52238  fi
52239
52240      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
52241    fi
52242
52243    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
52244    # defined in libawt_xawt.
52245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
52246$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
52247    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52248/* end confdefs.h.  */
52249#include <X11/extensions/Xrender.h>
52250int
52251main ()
52252{
52253XLinearGradient x;
52254  ;
52255  return 0;
52256}
52257_ACEOF
52258if ac_fn_c_try_compile "$LINENO"; then :
52259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52260$as_echo "yes" >&6; }
52261else
52262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52263$as_echo "no" >&6; }
52264         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
52265fi
52266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52267
52268    CFLAGS="$OLD_CFLAGS"
52269    ac_ext=cpp
52270ac_cpp='$CXXCPP $CPPFLAGS'
52271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52274
52275  fi # NEEDS_LIB_X11
52276
52277
52278
52279
52280
52281
52282# Check whether --with-cups was given.
52283if test "${with_cups+set}" = set; then :
52284  withval=$with_cups;
52285fi
52286
52287
52288# Check whether --with-cups-include was given.
52289if test "${with_cups_include+set}" = set; then :
52290  withval=$with_cups_include;
52291fi
52292
52293
52294  if test "x$NEEDS_LIB_CUPS" = xfalse; then
52295    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
52296        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
52297      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
52298$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
52299    fi
52300    CUPS_CFLAGS=
52301  else
52302    CUPS_FOUND=no
52303
52304    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
52305      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
52306    fi
52307
52308    if test "x${with_cups}" != x; then
52309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52310$as_echo_n "checking for cups headers... " >&6; }
52311      if test -s "${with_cups}/include/cups/cups.h"; then
52312        CUPS_CFLAGS="-I${with_cups}/include"
52313        CUPS_FOUND=yes
52314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52315$as_echo "$CUPS_FOUND" >&6; }
52316      else
52317        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
52318      fi
52319    fi
52320    if test "x${with_cups_include}" != x; then
52321      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52322$as_echo_n "checking for cups headers... " >&6; }
52323      if test -s "${with_cups_include}/cups/cups.h"; then
52324        CUPS_CFLAGS="-I${with_cups_include}"
52325        CUPS_FOUND=yes
52326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52327$as_echo "$CUPS_FOUND" >&6; }
52328      else
52329        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
52330      fi
52331    fi
52332    if test "x$CUPS_FOUND" = xno; then
52333      # Are the cups headers installed in the default /usr/include location?
52334      for ac_header in cups/cups.h cups/ppd.h
52335do :
52336  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
52337ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
52338if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
52339  cat >>confdefs.h <<_ACEOF
52340#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
52341_ACEOF
52342
52343          CUPS_FOUND=yes
52344          CUPS_CFLAGS=
52345          DEFAULT_CUPS=yes
52346
52347fi
52348
52349done
52350
52351    fi
52352    if test "x$CUPS_FOUND" = xno; then
52353      # Getting nervous now? Lets poke around for standard Solaris third-party
52354      # package installation locations.
52355      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
52356$as_echo_n "checking for cups headers... " >&6; }
52357      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
52358        # An SFW package seems to be installed!
52359        CUPS_FOUND=yes
52360        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
52361      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
52362        # A CSW package seems to be installed!
52363        CUPS_FOUND=yes
52364        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
52365      fi
52366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
52367$as_echo "$CUPS_FOUND" >&6; }
52368    fi
52369    if test "x$CUPS_FOUND" = xno; then
52370
52371  # Print a helpful message on how to acquire the necessary build dependency.
52372  # cups is the help tag: freetype, cups, alsa etc
52373  MISSING_DEPENDENCY=cups
52374
52375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52376    cygwin_help $MISSING_DEPENDENCY
52377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52378    msys_help $MISSING_DEPENDENCY
52379  else
52380    PKGHANDLER_COMMAND=
52381
52382    case $PKGHANDLER in
52383      apt-get)
52384        apt_help     $MISSING_DEPENDENCY ;;
52385      yum)
52386        yum_help     $MISSING_DEPENDENCY ;;
52387      port)
52388        port_help    $MISSING_DEPENDENCY ;;
52389      pkgutil)
52390        pkgutil_help $MISSING_DEPENDENCY ;;
52391      pkgadd)
52392        pkgadd_help  $MISSING_DEPENDENCY ;;
52393    esac
52394
52395    if test "x$PKGHANDLER_COMMAND" != x; then
52396      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52397    fi
52398  fi
52399
52400      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
52401    fi
52402  fi
52403
52404
52405
52406
52407
52408# Check whether --with-freetype was given.
52409if test "${with_freetype+set}" = set; then :
52410  withval=$with_freetype;
52411fi
52412
52413
52414# Check whether --with-freetype-include was given.
52415if test "${with_freetype_include+set}" = set; then :
52416  withval=$with_freetype_include;
52417fi
52418
52419
52420# Check whether --with-freetype-lib was given.
52421if test "${with_freetype_lib+set}" = set; then :
52422  withval=$with_freetype_lib;
52423fi
52424
52425
52426# Check whether --with-freetype-src was given.
52427if test "${with_freetype_src+set}" = set; then :
52428  withval=$with_freetype_src;
52429fi
52430
52431  # Check whether --enable-freetype-bundling was given.
52432if test "${enable_freetype_bundling+set}" = set; then :
52433  enableval=$enable_freetype_bundling;
52434fi
52435
52436
52437  # Need to specify explicitly since it needs to be overridden on some versions of macosx
52438  FREETYPE_BASE_NAME=freetype
52439  FREETYPE_CFLAGS=
52440  FREETYPE_LIBS=
52441  FREETYPE_BUNDLE_LIB_PATH=
52442
52443  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
52444    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
52445        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
52446        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
52447        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
52448      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
52449$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
52450    fi
52451    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
52452      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
52453$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
52454    fi
52455  else
52456    # freetype is needed to build; go get it!
52457
52458    BUNDLE_FREETYPE="$enable_freetype_bundling"
52459
52460    if  test "x$with_freetype_src" != x; then
52461      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52462        # Try to build freetype if --with-freetype-src was given on Windows
52463
52464  FREETYPE_SRC_PATH="$with_freetype_src"
52465  BUILD_FREETYPE=yes
52466
52467  # Check if the freetype sources are acessible..
52468  if ! test -d $FREETYPE_SRC_PATH; then
52469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
52470$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
52471    BUILD_FREETYPE=no
52472  fi
52473  # ..and contain a vc2010 project file
52474  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
52475  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
52476    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
52477$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
52478    BUILD_FREETYPE=no
52479  fi
52480  # Now check if configure found a version of 'msbuild.exe'
52481  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
52482    { $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
52483$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;}
52484    BUILD_FREETYPE=no
52485  fi
52486
52487  # Ready to go..
52488  if test "x$BUILD_FREETYPE" = xyes; then
52489    # msbuild requires trailing slashes for output directories
52490    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
52491    freetype_lib_path_unix="$freetype_lib_path"
52492    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
52493
52494  unix_path="$vcxproj_path"
52495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52496    windows_path=`$CYGPATH -m "$unix_path"`
52497    vcxproj_path="$windows_path"
52498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52499    windows_path=`cmd //c echo $unix_path`
52500    vcxproj_path="$windows_path"
52501  fi
52502
52503
52504  unix_path="$freetype_lib_path"
52505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52506    windows_path=`$CYGPATH -m "$unix_path"`
52507    freetype_lib_path="$windows_path"
52508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52509    windows_path=`cmd //c echo $unix_path`
52510    freetype_lib_path="$windows_path"
52511  fi
52512
52513
52514  unix_path="$freetype_obj_path"
52515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52516    windows_path=`$CYGPATH -m "$unix_path"`
52517    freetype_obj_path="$windows_path"
52518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52519    windows_path=`cmd //c echo $unix_path`
52520    freetype_obj_path="$windows_path"
52521  fi
52522
52523    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52524      freetype_platform=x64
52525    else
52526      freetype_platform=win32
52527    fi
52528
52529    # The original freetype project file is for VS 2010 (i.e. 'v100'),
52530    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
52531    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
52532    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
52533    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
52534$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
52535
52536    # First we try to build the freetype.dll
52537    $ECHO -e "@echo off\n"\
52538        "$MSBUILD $vcxproj_path "\
52539        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
52540        "/p:Configuration=\"Release Multithreaded\" "\
52541        "/p:Platform=$freetype_platform "\
52542        "/p:ConfigurationType=DynamicLibrary "\
52543        "/p:TargetName=freetype "\
52544        "/p:OutDir=\"$freetype_lib_path\" "\
52545        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
52546    cmd /c freetype.bat
52547
52548    if test -s "$freetype_lib_path_unix/freetype.dll"; then
52549      # If that succeeds we also build freetype.lib
52550      $ECHO -e "@echo off\n"\
52551          "$MSBUILD $vcxproj_path "\
52552          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
52553          "/p:Configuration=\"Release Multithreaded\" "\
52554          "/p:Platform=$freetype_platform "\
52555          "/p:ConfigurationType=StaticLibrary "\
52556          "/p:TargetName=freetype "\
52557          "/p:OutDir=\"$freetype_lib_path\" "\
52558          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
52559      cmd /c freetype.bat
52560
52561      if test -s "$freetype_lib_path_unix/freetype.lib"; then
52562        # Once we build both, lib and dll, set freetype lib and include path appropriately
52563        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
52564        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
52565        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
52566$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
52567      else
52568        BUILD_FREETYPE=no
52569      fi
52570    else
52571      BUILD_FREETYPE=no
52572    fi
52573  fi
52574
52575        if test "x$BUILD_FREETYPE" = xyes; then
52576          # Okay, we built it. Check that it works.
52577
52578  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52579  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52580  METHOD="--with-freetype-src"
52581
52582  # Let's start with an optimistic view of the world :-)
52583  FOUND_FREETYPE=yes
52584
52585  # First look for the canonical freetype main include file ft2build.h.
52586  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52587    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52588    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52589    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52590      # Fail.
52591      FOUND_FREETYPE=no
52592    fi
52593  fi
52594
52595  if test "x$FOUND_FREETYPE" = xyes; then
52596    # Include file found, let's continue the sanity check.
52597    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52598$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52599
52600    # Reset to default value
52601    FREETYPE_BASE_NAME=freetype
52602    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52603    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52604      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52605          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52606        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52607        # for the .6 version explicitly.
52608        FREETYPE_BASE_NAME=freetype.6
52609        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52610        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52611$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52612      else
52613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52614$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52615        FOUND_FREETYPE=no
52616      fi
52617    else
52618      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52619        # On Windows, we will need both .lib and .dll file.
52620        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52621          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52622$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52623          FOUND_FREETYPE=no
52624        fi
52625      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52626          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52627        # Found lib in isa dir, use that instead.
52628        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52629        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52630$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52631      fi
52632    fi
52633  fi
52634
52635  if test "x$FOUND_FREETYPE" = xyes; then
52636
52637  # Only process if variable expands to non-empty
52638
52639  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52641
52642  # Input might be given as Windows format, start by converting to
52643  # unix format.
52644  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52645  new_path=`$CYGPATH -u "$path"`
52646
52647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52650  # "foo.exe" is OK but "foo" is an error.
52651  #
52652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52653  # It is also a way to make sure we got the proper file name for the real test later on.
52654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52655  if test "x$test_shortpath" = x; then
52656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52657$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52658    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52659  fi
52660
52661  # Call helper function which possibly converts this using DOS-style short mode.
52662  # If so, the updated path is stored in $new_path.
52663
52664  input_path="$new_path"
52665  # Check if we need to convert this using DOS-style short mode. If the path
52666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52667  # take no chances and rewrite it.
52668  # Note: m4 eats our [], so we need to use [ and ] instead.
52669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52670  if test "x$has_forbidden_chars" != x; then
52671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52675      # Going to short mode and back again did indeed matter. Since short mode is
52676      # case insensitive, let's make it lowercase to improve readability.
52677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52678      # Now convert it back to Unix-style (cygpath)
52679      input_path=`$CYGPATH -u "$shortmode_path"`
52680      new_path="$input_path"
52681    fi
52682  fi
52683
52684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52685  if test "x$test_cygdrive_prefix" = x; then
52686    # As a simple fix, exclude /usr/bin since it's not a real path.
52687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52689      # a path prefixed by /cygdrive for fixpath to work.
52690      new_path="$CYGWIN_ROOT_PATH$input_path"
52691    fi
52692  fi
52693
52694
52695  if test "x$path" != "x$new_path"; then
52696    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52698$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52699  fi
52700
52701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52702
52703  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52704  has_colon=`$ECHO $path | $GREP ^.:`
52705  new_path="$path"
52706  if test "x$has_colon" = x; then
52707    # Not in mixed or Windows style, start by that.
52708    new_path=`cmd //c echo $path`
52709  fi
52710
52711
52712  input_path="$new_path"
52713  # Check if we need to convert this using DOS-style short mode. If the path
52714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52715  # take no chances and rewrite it.
52716  # Note: m4 eats our [], so we need to use [ and ] instead.
52717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52718  if test "x$has_forbidden_chars" != x; then
52719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52721  fi
52722
52723
52724  windows_path="$new_path"
52725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52726    unix_path=`$CYGPATH -u "$windows_path"`
52727    new_path="$unix_path"
52728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52730    new_path="$unix_path"
52731  fi
52732
52733  if test "x$path" != "x$new_path"; then
52734    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52736$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52737  fi
52738
52739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52741
52742    else
52743      # We're on a unix platform. Hooray! :)
52744      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52745      has_space=`$ECHO "$path" | $GREP " "`
52746      if test "x$has_space" != x; then
52747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52750      fi
52751
52752      # Use eval to expand a potential ~
52753      eval path="$path"
52754      if test ! -f "$path" && test ! -d "$path"; then
52755        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52756      fi
52757
52758      if test -d "$path"; then
52759        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52760      else
52761        dir="`$DIRNAME "$path"`"
52762        base="`$BASENAME "$path"`"
52763        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52764      fi
52765    fi
52766  fi
52767
52768
52769  # Only process if variable expands to non-empty
52770
52771  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52773
52774  # Input might be given as Windows format, start by converting to
52775  # unix format.
52776  path="$POTENTIAL_FREETYPE_LIB_PATH"
52777  new_path=`$CYGPATH -u "$path"`
52778
52779  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52780  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52781  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52782  # "foo.exe" is OK but "foo" is an error.
52783  #
52784  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52785  # It is also a way to make sure we got the proper file name for the real test later on.
52786  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52787  if test "x$test_shortpath" = x; then
52788    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52790    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52791  fi
52792
52793  # Call helper function which possibly converts this using DOS-style short mode.
52794  # If so, the updated path is stored in $new_path.
52795
52796  input_path="$new_path"
52797  # Check if we need to convert this using DOS-style short mode. If the path
52798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52799  # take no chances and rewrite it.
52800  # Note: m4 eats our [], so we need to use [ and ] instead.
52801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52802  if test "x$has_forbidden_chars" != x; then
52803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52807      # Going to short mode and back again did indeed matter. Since short mode is
52808      # case insensitive, let's make it lowercase to improve readability.
52809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52810      # Now convert it back to Unix-style (cygpath)
52811      input_path=`$CYGPATH -u "$shortmode_path"`
52812      new_path="$input_path"
52813    fi
52814  fi
52815
52816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52817  if test "x$test_cygdrive_prefix" = x; then
52818    # As a simple fix, exclude /usr/bin since it's not a real path.
52819    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52821      # a path prefixed by /cygdrive for fixpath to work.
52822      new_path="$CYGWIN_ROOT_PATH$input_path"
52823    fi
52824  fi
52825
52826
52827  if test "x$path" != "x$new_path"; then
52828    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52830$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52831  fi
52832
52833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52834
52835  path="$POTENTIAL_FREETYPE_LIB_PATH"
52836  has_colon=`$ECHO $path | $GREP ^.:`
52837  new_path="$path"
52838  if test "x$has_colon" = x; then
52839    # Not in mixed or Windows style, start by that.
52840    new_path=`cmd //c echo $path`
52841  fi
52842
52843
52844  input_path="$new_path"
52845  # Check if we need to convert this using DOS-style short mode. If the path
52846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52847  # take no chances and rewrite it.
52848  # Note: m4 eats our [], so we need to use [ and ] instead.
52849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52850  if test "x$has_forbidden_chars" != x; then
52851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52853  fi
52854
52855
52856  windows_path="$new_path"
52857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52858    unix_path=`$CYGPATH -u "$windows_path"`
52859    new_path="$unix_path"
52860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52862    new_path="$unix_path"
52863  fi
52864
52865  if test "x$path" != "x$new_path"; then
52866    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52868$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52869  fi
52870
52871  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52872  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52873
52874    else
52875      # We're on a unix platform. Hooray! :)
52876      path="$POTENTIAL_FREETYPE_LIB_PATH"
52877      has_space=`$ECHO "$path" | $GREP " "`
52878      if test "x$has_space" != x; then
52879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52880$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52881        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52882      fi
52883
52884      # Use eval to expand a potential ~
52885      eval path="$path"
52886      if test ! -f "$path" && test ! -d "$path"; then
52887        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52888      fi
52889
52890      if test -d "$path"; then
52891        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52892      else
52893        dir="`$DIRNAME "$path"`"
52894        base="`$BASENAME "$path"`"
52895        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52896      fi
52897    fi
52898  fi
52899
52900
52901    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52903$as_echo_n "checking for freetype includes... " >&6; }
52904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52905$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52906    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52908$as_echo_n "checking for freetype libraries... " >&6; }
52909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52910$as_echo "$FREETYPE_LIB_PATH" >&6; }
52911  fi
52912
52913          if test "x$FOUND_FREETYPE" != xyes; then
52914            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52915          fi
52916        else
52917          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52918$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52919          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52920        fi
52921      else
52922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52923$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52924      fi
52925    fi
52926
52927    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52928      # User has specified settings
52929
52930      if test "x$BUNDLE_FREETYPE" = x; then
52931        # If not specified, default is to bundle freetype
52932        BUNDLE_FREETYPE=yes
52933      fi
52934
52935      if test "x$with_freetype" != x; then
52936        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52937        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52938      fi
52939
52940      # Allow --with-freetype-lib and --with-freetype-include to override
52941      if test "x$with_freetype_include" != x; then
52942        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52943      fi
52944      if test "x$with_freetype_lib" != x; then
52945        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52946      fi
52947
52948      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52949        # Okay, we got it. Check that it works.
52950
52951  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52952  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52953  METHOD="--with-freetype"
52954
52955  # Let's start with an optimistic view of the world :-)
52956  FOUND_FREETYPE=yes
52957
52958  # First look for the canonical freetype main include file ft2build.h.
52959  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52960    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52961    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52962    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52963      # Fail.
52964      FOUND_FREETYPE=no
52965    fi
52966  fi
52967
52968  if test "x$FOUND_FREETYPE" = xyes; then
52969    # Include file found, let's continue the sanity check.
52970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52971$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52972
52973    # Reset to default value
52974    FREETYPE_BASE_NAME=freetype
52975    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52976    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52977      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52978          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52979        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52980        # for the .6 version explicitly.
52981        FREETYPE_BASE_NAME=freetype.6
52982        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52983        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52984$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52985      else
52986        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52987$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52988        FOUND_FREETYPE=no
52989      fi
52990    else
52991      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52992        # On Windows, we will need both .lib and .dll file.
52993        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52994          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52995$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52996          FOUND_FREETYPE=no
52997        fi
52998      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52999          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53000        # Found lib in isa dir, use that instead.
53001        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53002        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53003$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53004      fi
53005    fi
53006  fi
53007
53008  if test "x$FOUND_FREETYPE" = xyes; then
53009
53010  # Only process if variable expands to non-empty
53011
53012  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53014
53015  # Input might be given as Windows format, start by converting to
53016  # unix format.
53017  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53018  new_path=`$CYGPATH -u "$path"`
53019
53020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53023  # "foo.exe" is OK but "foo" is an error.
53024  #
53025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53026  # It is also a way to make sure we got the proper file name for the real test later on.
53027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53028  if test "x$test_shortpath" = x; then
53029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53031    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53032  fi
53033
53034  # Call helper function which possibly converts this using DOS-style short mode.
53035  # If so, the updated path is stored in $new_path.
53036
53037  input_path="$new_path"
53038  # Check if we need to convert this using DOS-style short mode. If the path
53039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53040  # take no chances and rewrite it.
53041  # Note: m4 eats our [], so we need to use [ and ] instead.
53042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53043  if test "x$has_forbidden_chars" != x; then
53044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53048      # Going to short mode and back again did indeed matter. Since short mode is
53049      # case insensitive, let's make it lowercase to improve readability.
53050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53051      # Now convert it back to Unix-style (cygpath)
53052      input_path=`$CYGPATH -u "$shortmode_path"`
53053      new_path="$input_path"
53054    fi
53055  fi
53056
53057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53058  if test "x$test_cygdrive_prefix" = x; then
53059    # As a simple fix, exclude /usr/bin since it's not a real path.
53060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53062      # a path prefixed by /cygdrive for fixpath to work.
53063      new_path="$CYGWIN_ROOT_PATH$input_path"
53064    fi
53065  fi
53066
53067
53068  if test "x$path" != "x$new_path"; then
53069    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53071$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53072  fi
53073
53074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53075
53076  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53077  has_colon=`$ECHO $path | $GREP ^.:`
53078  new_path="$path"
53079  if test "x$has_colon" = x; then
53080    # Not in mixed or Windows style, start by that.
53081    new_path=`cmd //c echo $path`
53082  fi
53083
53084
53085  input_path="$new_path"
53086  # Check if we need to convert this using DOS-style short mode. If the path
53087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53088  # take no chances and rewrite it.
53089  # Note: m4 eats our [], so we need to use [ and ] instead.
53090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53091  if test "x$has_forbidden_chars" != x; then
53092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53094  fi
53095
53096
53097  windows_path="$new_path"
53098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53099    unix_path=`$CYGPATH -u "$windows_path"`
53100    new_path="$unix_path"
53101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53103    new_path="$unix_path"
53104  fi
53105
53106  if test "x$path" != "x$new_path"; then
53107    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53110  fi
53111
53112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53114
53115    else
53116      # We're on a unix platform. Hooray! :)
53117      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53118      has_space=`$ECHO "$path" | $GREP " "`
53119      if test "x$has_space" != x; then
53120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53121$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53123      fi
53124
53125      # Use eval to expand a potential ~
53126      eval path="$path"
53127      if test ! -f "$path" && test ! -d "$path"; then
53128        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53129      fi
53130
53131      if test -d "$path"; then
53132        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53133      else
53134        dir="`$DIRNAME "$path"`"
53135        base="`$BASENAME "$path"`"
53136        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53137      fi
53138    fi
53139  fi
53140
53141
53142  # Only process if variable expands to non-empty
53143
53144  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53145    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53146
53147  # Input might be given as Windows format, start by converting to
53148  # unix format.
53149  path="$POTENTIAL_FREETYPE_LIB_PATH"
53150  new_path=`$CYGPATH -u "$path"`
53151
53152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53155  # "foo.exe" is OK but "foo" is an error.
53156  #
53157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53158  # It is also a way to make sure we got the proper file name for the real test later on.
53159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53160  if test "x$test_shortpath" = x; then
53161    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53162$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53163    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53164  fi
53165
53166  # Call helper function which possibly converts this using DOS-style short mode.
53167  # If so, the updated path is stored in $new_path.
53168
53169  input_path="$new_path"
53170  # Check if we need to convert this using DOS-style short mode. If the path
53171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53172  # take no chances and rewrite it.
53173  # Note: m4 eats our [], so we need to use [ and ] instead.
53174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53175  if test "x$has_forbidden_chars" != x; then
53176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53180      # Going to short mode and back again did indeed matter. Since short mode is
53181      # case insensitive, let's make it lowercase to improve readability.
53182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53183      # Now convert it back to Unix-style (cygpath)
53184      input_path=`$CYGPATH -u "$shortmode_path"`
53185      new_path="$input_path"
53186    fi
53187  fi
53188
53189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53190  if test "x$test_cygdrive_prefix" = x; then
53191    # As a simple fix, exclude /usr/bin since it's not a real path.
53192    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53194      # a path prefixed by /cygdrive for fixpath to work.
53195      new_path="$CYGWIN_ROOT_PATH$input_path"
53196    fi
53197  fi
53198
53199
53200  if test "x$path" != "x$new_path"; then
53201    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53203$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53204  fi
53205
53206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53207
53208  path="$POTENTIAL_FREETYPE_LIB_PATH"
53209  has_colon=`$ECHO $path | $GREP ^.:`
53210  new_path="$path"
53211  if test "x$has_colon" = x; then
53212    # Not in mixed or Windows style, start by that.
53213    new_path=`cmd //c echo $path`
53214  fi
53215
53216
53217  input_path="$new_path"
53218  # Check if we need to convert this using DOS-style short mode. If the path
53219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53220  # take no chances and rewrite it.
53221  # Note: m4 eats our [], so we need to use [ and ] instead.
53222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53223  if test "x$has_forbidden_chars" != x; then
53224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53226  fi
53227
53228
53229  windows_path="$new_path"
53230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53231    unix_path=`$CYGPATH -u "$windows_path"`
53232    new_path="$unix_path"
53233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53235    new_path="$unix_path"
53236  fi
53237
53238  if test "x$path" != "x$new_path"; then
53239    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53241$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53242  fi
53243
53244  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53245  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53246
53247    else
53248      # We're on a unix platform. Hooray! :)
53249      path="$POTENTIAL_FREETYPE_LIB_PATH"
53250      has_space=`$ECHO "$path" | $GREP " "`
53251      if test "x$has_space" != x; then
53252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53253$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53254        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53255      fi
53256
53257      # Use eval to expand a potential ~
53258      eval path="$path"
53259      if test ! -f "$path" && test ! -d "$path"; then
53260        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53261      fi
53262
53263      if test -d "$path"; then
53264        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53265      else
53266        dir="`$DIRNAME "$path"`"
53267        base="`$BASENAME "$path"`"
53268        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53269      fi
53270    fi
53271  fi
53272
53273
53274    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53276$as_echo_n "checking for freetype includes... " >&6; }
53277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53278$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53279    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53281$as_echo_n "checking for freetype libraries... " >&6; }
53282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53283$as_echo "$FREETYPE_LIB_PATH" >&6; }
53284  fi
53285
53286        if test "x$FOUND_FREETYPE" != xyes; then
53287          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
53288        fi
53289      else
53290        # User specified only one of lib or include. This is an error.
53291        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
53292          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
53293$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
53294          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
53295        else
53296          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
53297$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
53298          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
53299        fi
53300      fi
53301    else
53302      # User did not specify settings, but we need freetype. Try to locate it.
53303
53304      if test "x$BUNDLE_FREETYPE" = x; then
53305        # If not specified, default is to bundle freetype only on windows
53306        if test "x$OPENJDK_TARGET_OS" = xwindows; then
53307          BUNDLE_FREETYPE=yes
53308        else
53309          BUNDLE_FREETYPE=no
53310        fi
53311      fi
53312
53313      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
53314      if test "x$SYSROOT" = x; then
53315        if test "x$FOUND_FREETYPE" != xyes; then
53316          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
53317          if test "x$PKG_CONFIG" != x; then
53318
53319pkg_failed=no
53320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
53321$as_echo_n "checking for FREETYPE... " >&6; }
53322
53323if test -n "$FREETYPE_CFLAGS"; then
53324    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
53325 elif test -n "$PKG_CONFIG"; then
53326    if test -n "$PKG_CONFIG" && \
53327    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
53328  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
53329  ac_status=$?
53330  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53331  test $ac_status = 0; }; then
53332  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
53333else
53334  pkg_failed=yes
53335fi
53336 else
53337    pkg_failed=untried
53338fi
53339if test -n "$FREETYPE_LIBS"; then
53340    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
53341 elif test -n "$PKG_CONFIG"; then
53342    if test -n "$PKG_CONFIG" && \
53343    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
53344  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
53345  ac_status=$?
53346  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
53347  test $ac_status = 0; }; then
53348  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
53349else
53350  pkg_failed=yes
53351fi
53352 else
53353    pkg_failed=untried
53354fi
53355
53356
53357
53358if test $pkg_failed = yes; then
53359
53360if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
53361        _pkg_short_errors_supported=yes
53362else
53363        _pkg_short_errors_supported=no
53364fi
53365        if test $_pkg_short_errors_supported = yes; then
53366	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
53367        else
53368	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
53369        fi
53370	# Put the nasty error message in config.log where it belongs
53371	echo "$FREETYPE_PKG_ERRORS" >&5
53372
53373	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53374$as_echo "no" >&6; }
53375                FOUND_FREETYPE=no
53376elif test $pkg_failed = untried; then
53377	FOUND_FREETYPE=no
53378else
53379	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
53380	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
53381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53382$as_echo "yes" >&6; }
53383	FOUND_FREETYPE=yes
53384fi
53385            if test "x$FOUND_FREETYPE" = xyes; then
53386              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
53387              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
53388              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
53389              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
53390                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
53391              fi
53392              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
53393              if test "x$BUNDLE_FREETYPE" = xyes; then
53394                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
53395$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
53396                FOUND_FREETYPE=no
53397              else
53398                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
53399$as_echo_n "checking for freetype... " >&6; }
53400                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
53401$as_echo "yes (using pkg-config)" >&6; }
53402              fi
53403            fi
53404          fi
53405        fi
53406      fi
53407
53408      if test "x$FOUND_FREETYPE" != xyes; then
53409        # Check in well-known locations
53410        if test "x$OPENJDK_TARGET_OS" = xwindows; then
53411          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
53412
53413  windows_path="$FREETYPE_BASE_DIR"
53414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53415    unix_path=`$CYGPATH -u "$windows_path"`
53416    FREETYPE_BASE_DIR="$unix_path"
53417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53419    FREETYPE_BASE_DIR="$unix_path"
53420  fi
53421
53422
53423  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53424  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53425  METHOD="well-known location"
53426
53427  # Let's start with an optimistic view of the world :-)
53428  FOUND_FREETYPE=yes
53429
53430  # First look for the canonical freetype main include file ft2build.h.
53431  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53432    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53433    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53434    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53435      # Fail.
53436      FOUND_FREETYPE=no
53437    fi
53438  fi
53439
53440  if test "x$FOUND_FREETYPE" = xyes; then
53441    # Include file found, let's continue the sanity check.
53442    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53443$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53444
53445    # Reset to default value
53446    FREETYPE_BASE_NAME=freetype
53447    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53448    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53449      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53450          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53451        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53452        # for the .6 version explicitly.
53453        FREETYPE_BASE_NAME=freetype.6
53454        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53455        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53456$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53457      else
53458        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53459$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53460        FOUND_FREETYPE=no
53461      fi
53462    else
53463      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53464        # On Windows, we will need both .lib and .dll file.
53465        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53466          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53467$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53468          FOUND_FREETYPE=no
53469        fi
53470      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53471          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53472        # Found lib in isa dir, use that instead.
53473        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53474        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53475$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53476      fi
53477    fi
53478  fi
53479
53480  if test "x$FOUND_FREETYPE" = xyes; then
53481
53482  # Only process if variable expands to non-empty
53483
53484  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53486
53487  # Input might be given as Windows format, start by converting to
53488  # unix format.
53489  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53490  new_path=`$CYGPATH -u "$path"`
53491
53492  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53493  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53494  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53495  # "foo.exe" is OK but "foo" is an error.
53496  #
53497  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53498  # It is also a way to make sure we got the proper file name for the real test later on.
53499  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53500  if test "x$test_shortpath" = x; then
53501    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53502$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53503    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53504  fi
53505
53506  # Call helper function which possibly converts this using DOS-style short mode.
53507  # If so, the updated path is stored in $new_path.
53508
53509  input_path="$new_path"
53510  # Check if we need to convert this using DOS-style short mode. If the path
53511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53512  # take no chances and rewrite it.
53513  # Note: m4 eats our [], so we need to use [ and ] instead.
53514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53515  if test "x$has_forbidden_chars" != x; then
53516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53520      # Going to short mode and back again did indeed matter. Since short mode is
53521      # case insensitive, let's make it lowercase to improve readability.
53522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53523      # Now convert it back to Unix-style (cygpath)
53524      input_path=`$CYGPATH -u "$shortmode_path"`
53525      new_path="$input_path"
53526    fi
53527  fi
53528
53529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53530  if test "x$test_cygdrive_prefix" = x; then
53531    # As a simple fix, exclude /usr/bin since it's not a real path.
53532    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53534      # a path prefixed by /cygdrive for fixpath to work.
53535      new_path="$CYGWIN_ROOT_PATH$input_path"
53536    fi
53537  fi
53538
53539
53540  if test "x$path" != "x$new_path"; then
53541    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53544  fi
53545
53546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53547
53548  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53549  has_colon=`$ECHO $path | $GREP ^.:`
53550  new_path="$path"
53551  if test "x$has_colon" = x; then
53552    # Not in mixed or Windows style, start by that.
53553    new_path=`cmd //c echo $path`
53554  fi
53555
53556
53557  input_path="$new_path"
53558  # Check if we need to convert this using DOS-style short mode. If the path
53559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53560  # take no chances and rewrite it.
53561  # Note: m4 eats our [], so we need to use [ and ] instead.
53562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53563  if test "x$has_forbidden_chars" != x; then
53564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53566  fi
53567
53568
53569  windows_path="$new_path"
53570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53571    unix_path=`$CYGPATH -u "$windows_path"`
53572    new_path="$unix_path"
53573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53575    new_path="$unix_path"
53576  fi
53577
53578  if test "x$path" != "x$new_path"; then
53579    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53581$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53582  fi
53583
53584  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53585  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53586
53587    else
53588      # We're on a unix platform. Hooray! :)
53589      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53590      has_space=`$ECHO "$path" | $GREP " "`
53591      if test "x$has_space" != x; then
53592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53593$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53594        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53595      fi
53596
53597      # Use eval to expand a potential ~
53598      eval path="$path"
53599      if test ! -f "$path" && test ! -d "$path"; then
53600        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53601      fi
53602
53603      if test -d "$path"; then
53604        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53605      else
53606        dir="`$DIRNAME "$path"`"
53607        base="`$BASENAME "$path"`"
53608        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53609      fi
53610    fi
53611  fi
53612
53613
53614  # Only process if variable expands to non-empty
53615
53616  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53618
53619  # Input might be given as Windows format, start by converting to
53620  # unix format.
53621  path="$POTENTIAL_FREETYPE_LIB_PATH"
53622  new_path=`$CYGPATH -u "$path"`
53623
53624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53627  # "foo.exe" is OK but "foo" is an error.
53628  #
53629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53630  # It is also a way to make sure we got the proper file name for the real test later on.
53631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53632  if test "x$test_shortpath" = x; then
53633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53635    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53636  fi
53637
53638  # Call helper function which possibly converts this using DOS-style short mode.
53639  # If so, the updated path is stored in $new_path.
53640
53641  input_path="$new_path"
53642  # Check if we need to convert this using DOS-style short mode. If the path
53643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53644  # take no chances and rewrite it.
53645  # Note: m4 eats our [], so we need to use [ and ] instead.
53646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53647  if test "x$has_forbidden_chars" != x; then
53648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53652      # Going to short mode and back again did indeed matter. Since short mode is
53653      # case insensitive, let's make it lowercase to improve readability.
53654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53655      # Now convert it back to Unix-style (cygpath)
53656      input_path=`$CYGPATH -u "$shortmode_path"`
53657      new_path="$input_path"
53658    fi
53659  fi
53660
53661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53662  if test "x$test_cygdrive_prefix" = x; then
53663    # As a simple fix, exclude /usr/bin since it's not a real path.
53664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53666      # a path prefixed by /cygdrive for fixpath to work.
53667      new_path="$CYGWIN_ROOT_PATH$input_path"
53668    fi
53669  fi
53670
53671
53672  if test "x$path" != "x$new_path"; then
53673    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53676  fi
53677
53678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53679
53680  path="$POTENTIAL_FREETYPE_LIB_PATH"
53681  has_colon=`$ECHO $path | $GREP ^.:`
53682  new_path="$path"
53683  if test "x$has_colon" = x; then
53684    # Not in mixed or Windows style, start by that.
53685    new_path=`cmd //c echo $path`
53686  fi
53687
53688
53689  input_path="$new_path"
53690  # Check if we need to convert this using DOS-style short mode. If the path
53691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53692  # take no chances and rewrite it.
53693  # Note: m4 eats our [], so we need to use [ and ] instead.
53694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53695  if test "x$has_forbidden_chars" != x; then
53696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53698  fi
53699
53700
53701  windows_path="$new_path"
53702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53703    unix_path=`$CYGPATH -u "$windows_path"`
53704    new_path="$unix_path"
53705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53707    new_path="$unix_path"
53708  fi
53709
53710  if test "x$path" != "x$new_path"; then
53711    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53713$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53714  fi
53715
53716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53718
53719    else
53720      # We're on a unix platform. Hooray! :)
53721      path="$POTENTIAL_FREETYPE_LIB_PATH"
53722      has_space=`$ECHO "$path" | $GREP " "`
53723      if test "x$has_space" != x; then
53724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53727      fi
53728
53729      # Use eval to expand a potential ~
53730      eval path="$path"
53731      if test ! -f "$path" && test ! -d "$path"; then
53732        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53733      fi
53734
53735      if test -d "$path"; then
53736        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53737      else
53738        dir="`$DIRNAME "$path"`"
53739        base="`$BASENAME "$path"`"
53740        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53741      fi
53742    fi
53743  fi
53744
53745
53746    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53748$as_echo_n "checking for freetype includes... " >&6; }
53749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53750$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53751    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53752    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53753$as_echo_n "checking for freetype libraries... " >&6; }
53754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53755$as_echo "$FREETYPE_LIB_PATH" >&6; }
53756  fi
53757
53758          if test "x$FOUND_FREETYPE" != xyes; then
53759            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53760
53761  windows_path="$FREETYPE_BASE_DIR"
53762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53763    unix_path=`$CYGPATH -u "$windows_path"`
53764    FREETYPE_BASE_DIR="$unix_path"
53765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53767    FREETYPE_BASE_DIR="$unix_path"
53768  fi
53769
53770
53771  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53772  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53773  METHOD="well-known location"
53774
53775  # Let's start with an optimistic view of the world :-)
53776  FOUND_FREETYPE=yes
53777
53778  # First look for the canonical freetype main include file ft2build.h.
53779  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53780    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53781    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53782    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53783      # Fail.
53784      FOUND_FREETYPE=no
53785    fi
53786  fi
53787
53788  if test "x$FOUND_FREETYPE" = xyes; then
53789    # Include file found, let's continue the sanity check.
53790    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53791$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53792
53793    # Reset to default value
53794    FREETYPE_BASE_NAME=freetype
53795    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53796    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53797      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53798          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53799        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53800        # for the .6 version explicitly.
53801        FREETYPE_BASE_NAME=freetype.6
53802        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53803        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53804$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53805      else
53806        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53807$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53808        FOUND_FREETYPE=no
53809      fi
53810    else
53811      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53812        # On Windows, we will need both .lib and .dll file.
53813        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53814          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53815$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53816          FOUND_FREETYPE=no
53817        fi
53818      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53819          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53820        # Found lib in isa dir, use that instead.
53821        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53822        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53823$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53824      fi
53825    fi
53826  fi
53827
53828  if test "x$FOUND_FREETYPE" = xyes; then
53829
53830  # Only process if variable expands to non-empty
53831
53832  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53834
53835  # Input might be given as Windows format, start by converting to
53836  # unix format.
53837  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53838  new_path=`$CYGPATH -u "$path"`
53839
53840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53843  # "foo.exe" is OK but "foo" is an error.
53844  #
53845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53846  # It is also a way to make sure we got the proper file name for the real test later on.
53847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53848  if test "x$test_shortpath" = x; then
53849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53851    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53852  fi
53853
53854  # Call helper function which possibly converts this using DOS-style short mode.
53855  # If so, the updated path is stored in $new_path.
53856
53857  input_path="$new_path"
53858  # Check if we need to convert this using DOS-style short mode. If the path
53859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53860  # take no chances and rewrite it.
53861  # Note: m4 eats our [], so we need to use [ and ] instead.
53862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53863  if test "x$has_forbidden_chars" != x; then
53864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53868      # Going to short mode and back again did indeed matter. Since short mode is
53869      # case insensitive, let's make it lowercase to improve readability.
53870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53871      # Now convert it back to Unix-style (cygpath)
53872      input_path=`$CYGPATH -u "$shortmode_path"`
53873      new_path="$input_path"
53874    fi
53875  fi
53876
53877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53878  if test "x$test_cygdrive_prefix" = x; then
53879    # As a simple fix, exclude /usr/bin since it's not a real path.
53880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53882      # a path prefixed by /cygdrive for fixpath to work.
53883      new_path="$CYGWIN_ROOT_PATH$input_path"
53884    fi
53885  fi
53886
53887
53888  if test "x$path" != "x$new_path"; then
53889    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53892  fi
53893
53894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53895
53896  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53897  has_colon=`$ECHO $path | $GREP ^.:`
53898  new_path="$path"
53899  if test "x$has_colon" = x; then
53900    # Not in mixed or Windows style, start by that.
53901    new_path=`cmd //c echo $path`
53902  fi
53903
53904
53905  input_path="$new_path"
53906  # Check if we need to convert this using DOS-style short mode. If the path
53907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53908  # take no chances and rewrite it.
53909  # Note: m4 eats our [], so we need to use [ and ] instead.
53910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53911  if test "x$has_forbidden_chars" != x; then
53912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53914  fi
53915
53916
53917  windows_path="$new_path"
53918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53919    unix_path=`$CYGPATH -u "$windows_path"`
53920    new_path="$unix_path"
53921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53923    new_path="$unix_path"
53924  fi
53925
53926  if test "x$path" != "x$new_path"; then
53927    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53929$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53930  fi
53931
53932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53934
53935    else
53936      # We're on a unix platform. Hooray! :)
53937      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53938      has_space=`$ECHO "$path" | $GREP " "`
53939      if test "x$has_space" != x; then
53940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53941$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53943      fi
53944
53945      # Use eval to expand a potential ~
53946      eval path="$path"
53947      if test ! -f "$path" && test ! -d "$path"; then
53948        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53949      fi
53950
53951      if test -d "$path"; then
53952        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53953      else
53954        dir="`$DIRNAME "$path"`"
53955        base="`$BASENAME "$path"`"
53956        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53957      fi
53958    fi
53959  fi
53960
53961
53962  # Only process if variable expands to non-empty
53963
53964  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53966
53967  # Input might be given as Windows format, start by converting to
53968  # unix format.
53969  path="$POTENTIAL_FREETYPE_LIB_PATH"
53970  new_path=`$CYGPATH -u "$path"`
53971
53972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53975  # "foo.exe" is OK but "foo" is an error.
53976  #
53977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53978  # It is also a way to make sure we got the proper file name for the real test later on.
53979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53980  if test "x$test_shortpath" = x; then
53981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53983    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53984  fi
53985
53986  # Call helper function which possibly converts this using DOS-style short mode.
53987  # If so, the updated path is stored in $new_path.
53988
53989  input_path="$new_path"
53990  # Check if we need to convert this using DOS-style short mode. If the path
53991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53992  # take no chances and rewrite it.
53993  # Note: m4 eats our [], so we need to use [ and ] instead.
53994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53995  if test "x$has_forbidden_chars" != x; then
53996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54000      # Going to short mode and back again did indeed matter. Since short mode is
54001      # case insensitive, let's make it lowercase to improve readability.
54002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54003      # Now convert it back to Unix-style (cygpath)
54004      input_path=`$CYGPATH -u "$shortmode_path"`
54005      new_path="$input_path"
54006    fi
54007  fi
54008
54009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54010  if test "x$test_cygdrive_prefix" = x; then
54011    # As a simple fix, exclude /usr/bin since it's not a real path.
54012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54014      # a path prefixed by /cygdrive for fixpath to work.
54015      new_path="$CYGWIN_ROOT_PATH$input_path"
54016    fi
54017  fi
54018
54019
54020  if test "x$path" != "x$new_path"; then
54021    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54023$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54024  fi
54025
54026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54027
54028  path="$POTENTIAL_FREETYPE_LIB_PATH"
54029  has_colon=`$ECHO $path | $GREP ^.:`
54030  new_path="$path"
54031  if test "x$has_colon" = x; then
54032    # Not in mixed or Windows style, start by that.
54033    new_path=`cmd //c echo $path`
54034  fi
54035
54036
54037  input_path="$new_path"
54038  # Check if we need to convert this using DOS-style short mode. If the path
54039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54040  # take no chances and rewrite it.
54041  # Note: m4 eats our [], so we need to use [ and ] instead.
54042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54043  if test "x$has_forbidden_chars" != x; then
54044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54046  fi
54047
54048
54049  windows_path="$new_path"
54050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54051    unix_path=`$CYGPATH -u "$windows_path"`
54052    new_path="$unix_path"
54053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54055    new_path="$unix_path"
54056  fi
54057
54058  if test "x$path" != "x$new_path"; then
54059    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54062  fi
54063
54064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54066
54067    else
54068      # We're on a unix platform. Hooray! :)
54069      path="$POTENTIAL_FREETYPE_LIB_PATH"
54070      has_space=`$ECHO "$path" | $GREP " "`
54071      if test "x$has_space" != x; then
54072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54073$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54074        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54075      fi
54076
54077      # Use eval to expand a potential ~
54078      eval path="$path"
54079      if test ! -f "$path" && test ! -d "$path"; then
54080        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54081      fi
54082
54083      if test -d "$path"; then
54084        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54085      else
54086        dir="`$DIRNAME "$path"`"
54087        base="`$BASENAME "$path"`"
54088        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54089      fi
54090    fi
54091  fi
54092
54093
54094    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54096$as_echo_n "checking for freetype includes... " >&6; }
54097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54098$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54099    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54101$as_echo_n "checking for freetype libraries... " >&6; }
54102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54103$as_echo "$FREETYPE_LIB_PATH" >&6; }
54104  fi
54105
54106          fi
54107          if test "x$FOUND_FREETYPE" != xyes; then
54108            FREETYPE_BASE_DIR="$HOME/freetype"
54109
54110  windows_path="$FREETYPE_BASE_DIR"
54111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54112    unix_path=`$CYGPATH -u "$windows_path"`
54113    FREETYPE_BASE_DIR="$unix_path"
54114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54116    FREETYPE_BASE_DIR="$unix_path"
54117  fi
54118
54119            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54120
54121  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54122  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54123  METHOD="well-known location"
54124
54125  # Let's start with an optimistic view of the world :-)
54126  FOUND_FREETYPE=yes
54127
54128  # First look for the canonical freetype main include file ft2build.h.
54129  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54130    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54131    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54132    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54133      # Fail.
54134      FOUND_FREETYPE=no
54135    fi
54136  fi
54137
54138  if test "x$FOUND_FREETYPE" = xyes; then
54139    # Include file found, let's continue the sanity check.
54140    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54141$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54142
54143    # Reset to default value
54144    FREETYPE_BASE_NAME=freetype
54145    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54146    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54147      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54148          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54149        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54150        # for the .6 version explicitly.
54151        FREETYPE_BASE_NAME=freetype.6
54152        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54153        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54154$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54155      else
54156        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54157$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54158        FOUND_FREETYPE=no
54159      fi
54160    else
54161      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54162        # On Windows, we will need both .lib and .dll file.
54163        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54164          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54165$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54166          FOUND_FREETYPE=no
54167        fi
54168      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54169          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54170        # Found lib in isa dir, use that instead.
54171        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54172        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54173$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54174      fi
54175    fi
54176  fi
54177
54178  if test "x$FOUND_FREETYPE" = xyes; then
54179
54180  # Only process if variable expands to non-empty
54181
54182  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54183    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54184
54185  # Input might be given as Windows format, start by converting to
54186  # unix format.
54187  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54188  new_path=`$CYGPATH -u "$path"`
54189
54190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54193  # "foo.exe" is OK but "foo" is an error.
54194  #
54195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54196  # It is also a way to make sure we got the proper file name for the real test later on.
54197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54198  if test "x$test_shortpath" = x; then
54199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54200$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54201    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54202  fi
54203
54204  # Call helper function which possibly converts this using DOS-style short mode.
54205  # If so, the updated path is stored in $new_path.
54206
54207  input_path="$new_path"
54208  # Check if we need to convert this using DOS-style short mode. If the path
54209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54210  # take no chances and rewrite it.
54211  # Note: m4 eats our [], so we need to use [ and ] instead.
54212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54213  if test "x$has_forbidden_chars" != x; then
54214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54218      # Going to short mode and back again did indeed matter. Since short mode is
54219      # case insensitive, let's make it lowercase to improve readability.
54220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54221      # Now convert it back to Unix-style (cygpath)
54222      input_path=`$CYGPATH -u "$shortmode_path"`
54223      new_path="$input_path"
54224    fi
54225  fi
54226
54227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54228  if test "x$test_cygdrive_prefix" = x; then
54229    # As a simple fix, exclude /usr/bin since it's not a real path.
54230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54232      # a path prefixed by /cygdrive for fixpath to work.
54233      new_path="$CYGWIN_ROOT_PATH$input_path"
54234    fi
54235  fi
54236
54237
54238  if test "x$path" != "x$new_path"; then
54239    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54241$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54242  fi
54243
54244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54245
54246  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54247  has_colon=`$ECHO $path | $GREP ^.:`
54248  new_path="$path"
54249  if test "x$has_colon" = x; then
54250    # Not in mixed or Windows style, start by that.
54251    new_path=`cmd //c echo $path`
54252  fi
54253
54254
54255  input_path="$new_path"
54256  # Check if we need to convert this using DOS-style short mode. If the path
54257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54258  # take no chances and rewrite it.
54259  # Note: m4 eats our [], so we need to use [ and ] instead.
54260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54261  if test "x$has_forbidden_chars" != x; then
54262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54264  fi
54265
54266
54267  windows_path="$new_path"
54268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54269    unix_path=`$CYGPATH -u "$windows_path"`
54270    new_path="$unix_path"
54271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54273    new_path="$unix_path"
54274  fi
54275
54276  if test "x$path" != "x$new_path"; then
54277    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54279$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54280  fi
54281
54282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54284
54285    else
54286      # We're on a unix platform. Hooray! :)
54287      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54288      has_space=`$ECHO "$path" | $GREP " "`
54289      if test "x$has_space" != x; then
54290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54291$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54292        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54293      fi
54294
54295      # Use eval to expand a potential ~
54296      eval path="$path"
54297      if test ! -f "$path" && test ! -d "$path"; then
54298        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54299      fi
54300
54301      if test -d "$path"; then
54302        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54303      else
54304        dir="`$DIRNAME "$path"`"
54305        base="`$BASENAME "$path"`"
54306        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54307      fi
54308    fi
54309  fi
54310
54311
54312  # Only process if variable expands to non-empty
54313
54314  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54316
54317  # Input might be given as Windows format, start by converting to
54318  # unix format.
54319  path="$POTENTIAL_FREETYPE_LIB_PATH"
54320  new_path=`$CYGPATH -u "$path"`
54321
54322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54325  # "foo.exe" is OK but "foo" is an error.
54326  #
54327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54328  # It is also a way to make sure we got the proper file name for the real test later on.
54329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54330  if test "x$test_shortpath" = x; then
54331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54333    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54334  fi
54335
54336  # Call helper function which possibly converts this using DOS-style short mode.
54337  # If so, the updated path is stored in $new_path.
54338
54339  input_path="$new_path"
54340  # Check if we need to convert this using DOS-style short mode. If the path
54341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54342  # take no chances and rewrite it.
54343  # Note: m4 eats our [], so we need to use [ and ] instead.
54344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54345  if test "x$has_forbidden_chars" != x; then
54346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54350      # Going to short mode and back again did indeed matter. Since short mode is
54351      # case insensitive, let's make it lowercase to improve readability.
54352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54353      # Now convert it back to Unix-style (cygpath)
54354      input_path=`$CYGPATH -u "$shortmode_path"`
54355      new_path="$input_path"
54356    fi
54357  fi
54358
54359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54360  if test "x$test_cygdrive_prefix" = x; then
54361    # As a simple fix, exclude /usr/bin since it's not a real path.
54362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54364      # a path prefixed by /cygdrive for fixpath to work.
54365      new_path="$CYGWIN_ROOT_PATH$input_path"
54366    fi
54367  fi
54368
54369
54370  if test "x$path" != "x$new_path"; then
54371    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54373$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54374  fi
54375
54376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54377
54378  path="$POTENTIAL_FREETYPE_LIB_PATH"
54379  has_colon=`$ECHO $path | $GREP ^.:`
54380  new_path="$path"
54381  if test "x$has_colon" = x; then
54382    # Not in mixed or Windows style, start by that.
54383    new_path=`cmd //c echo $path`
54384  fi
54385
54386
54387  input_path="$new_path"
54388  # Check if we need to convert this using DOS-style short mode. If the path
54389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54390  # take no chances and rewrite it.
54391  # Note: m4 eats our [], so we need to use [ and ] instead.
54392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54393  if test "x$has_forbidden_chars" != x; then
54394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54396  fi
54397
54398
54399  windows_path="$new_path"
54400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54401    unix_path=`$CYGPATH -u "$windows_path"`
54402    new_path="$unix_path"
54403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54405    new_path="$unix_path"
54406  fi
54407
54408  if test "x$path" != "x$new_path"; then
54409    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54412  fi
54413
54414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54416
54417    else
54418      # We're on a unix platform. Hooray! :)
54419      path="$POTENTIAL_FREETYPE_LIB_PATH"
54420      has_space=`$ECHO "$path" | $GREP " "`
54421      if test "x$has_space" != x; then
54422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54425      fi
54426
54427      # Use eval to expand a potential ~
54428      eval path="$path"
54429      if test ! -f "$path" && test ! -d "$path"; then
54430        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54431      fi
54432
54433      if test -d "$path"; then
54434        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54435      else
54436        dir="`$DIRNAME "$path"`"
54437        base="`$BASENAME "$path"`"
54438        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54439      fi
54440    fi
54441  fi
54442
54443
54444    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54446$as_echo_n "checking for freetype includes... " >&6; }
54447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54448$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54449    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54451$as_echo_n "checking for freetype libraries... " >&6; }
54452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54453$as_echo "$FREETYPE_LIB_PATH" >&6; }
54454  fi
54455
54456            else
54457
54458  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54459  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54460  METHOD="well-known location"
54461
54462  # Let's start with an optimistic view of the world :-)
54463  FOUND_FREETYPE=yes
54464
54465  # First look for the canonical freetype main include file ft2build.h.
54466  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54467    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54468    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54469    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54470      # Fail.
54471      FOUND_FREETYPE=no
54472    fi
54473  fi
54474
54475  if test "x$FOUND_FREETYPE" = xyes; then
54476    # Include file found, let's continue the sanity check.
54477    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54478$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54479
54480    # Reset to default value
54481    FREETYPE_BASE_NAME=freetype
54482    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54483    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54484      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54485          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54486        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54487        # for the .6 version explicitly.
54488        FREETYPE_BASE_NAME=freetype.6
54489        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54490        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54491$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54492      else
54493        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54494$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54495        FOUND_FREETYPE=no
54496      fi
54497    else
54498      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54499        # On Windows, we will need both .lib and .dll file.
54500        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54501          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54502$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54503          FOUND_FREETYPE=no
54504        fi
54505      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54506          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54507        # Found lib in isa dir, use that instead.
54508        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54509        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54510$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54511      fi
54512    fi
54513  fi
54514
54515  if test "x$FOUND_FREETYPE" = xyes; then
54516
54517  # Only process if variable expands to non-empty
54518
54519  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54521
54522  # Input might be given as Windows format, start by converting to
54523  # unix format.
54524  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54525  new_path=`$CYGPATH -u "$path"`
54526
54527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54530  # "foo.exe" is OK but "foo" is an error.
54531  #
54532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54533  # It is also a way to make sure we got the proper file name for the real test later on.
54534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54535  if test "x$test_shortpath" = x; then
54536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54537$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54538    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54539  fi
54540
54541  # Call helper function which possibly converts this using DOS-style short mode.
54542  # If so, the updated path is stored in $new_path.
54543
54544  input_path="$new_path"
54545  # Check if we need to convert this using DOS-style short mode. If the path
54546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54547  # take no chances and rewrite it.
54548  # Note: m4 eats our [], so we need to use [ and ] instead.
54549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54550  if test "x$has_forbidden_chars" != x; then
54551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54555      # Going to short mode and back again did indeed matter. Since short mode is
54556      # case insensitive, let's make it lowercase to improve readability.
54557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54558      # Now convert it back to Unix-style (cygpath)
54559      input_path=`$CYGPATH -u "$shortmode_path"`
54560      new_path="$input_path"
54561    fi
54562  fi
54563
54564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54565  if test "x$test_cygdrive_prefix" = x; then
54566    # As a simple fix, exclude /usr/bin since it's not a real path.
54567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54569      # a path prefixed by /cygdrive for fixpath to work.
54570      new_path="$CYGWIN_ROOT_PATH$input_path"
54571    fi
54572  fi
54573
54574
54575  if test "x$path" != "x$new_path"; then
54576    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54578$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54579  fi
54580
54581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54582
54583  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54584  has_colon=`$ECHO $path | $GREP ^.:`
54585  new_path="$path"
54586  if test "x$has_colon" = x; then
54587    # Not in mixed or Windows style, start by that.
54588    new_path=`cmd //c echo $path`
54589  fi
54590
54591
54592  input_path="$new_path"
54593  # Check if we need to convert this using DOS-style short mode. If the path
54594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54595  # take no chances and rewrite it.
54596  # Note: m4 eats our [], so we need to use [ and ] instead.
54597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54598  if test "x$has_forbidden_chars" != x; then
54599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54601  fi
54602
54603
54604  windows_path="$new_path"
54605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54606    unix_path=`$CYGPATH -u "$windows_path"`
54607    new_path="$unix_path"
54608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54610    new_path="$unix_path"
54611  fi
54612
54613  if test "x$path" != "x$new_path"; then
54614    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54616$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54617  fi
54618
54619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54621
54622    else
54623      # We're on a unix platform. Hooray! :)
54624      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54625      has_space=`$ECHO "$path" | $GREP " "`
54626      if test "x$has_space" != x; then
54627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54628$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54630      fi
54631
54632      # Use eval to expand a potential ~
54633      eval path="$path"
54634      if test ! -f "$path" && test ! -d "$path"; then
54635        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54636      fi
54637
54638      if test -d "$path"; then
54639        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54640      else
54641        dir="`$DIRNAME "$path"`"
54642        base="`$BASENAME "$path"`"
54643        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54644      fi
54645    fi
54646  fi
54647
54648
54649  # Only process if variable expands to non-empty
54650
54651  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54653
54654  # Input might be given as Windows format, start by converting to
54655  # unix format.
54656  path="$POTENTIAL_FREETYPE_LIB_PATH"
54657  new_path=`$CYGPATH -u "$path"`
54658
54659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54662  # "foo.exe" is OK but "foo" is an error.
54663  #
54664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54665  # It is also a way to make sure we got the proper file name for the real test later on.
54666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54667  if test "x$test_shortpath" = x; then
54668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54669$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54670    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54671  fi
54672
54673  # Call helper function which possibly converts this using DOS-style short mode.
54674  # If so, the updated path is stored in $new_path.
54675
54676  input_path="$new_path"
54677  # Check if we need to convert this using DOS-style short mode. If the path
54678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54679  # take no chances and rewrite it.
54680  # Note: m4 eats our [], so we need to use [ and ] instead.
54681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54682  if test "x$has_forbidden_chars" != x; then
54683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54687      # Going to short mode and back again did indeed matter. Since short mode is
54688      # case insensitive, let's make it lowercase to improve readability.
54689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54690      # Now convert it back to Unix-style (cygpath)
54691      input_path=`$CYGPATH -u "$shortmode_path"`
54692      new_path="$input_path"
54693    fi
54694  fi
54695
54696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54697  if test "x$test_cygdrive_prefix" = x; then
54698    # As a simple fix, exclude /usr/bin since it's not a real path.
54699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54701      # a path prefixed by /cygdrive for fixpath to work.
54702      new_path="$CYGWIN_ROOT_PATH$input_path"
54703    fi
54704  fi
54705
54706
54707  if test "x$path" != "x$new_path"; then
54708    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54710$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54711  fi
54712
54713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54714
54715  path="$POTENTIAL_FREETYPE_LIB_PATH"
54716  has_colon=`$ECHO $path | $GREP ^.:`
54717  new_path="$path"
54718  if test "x$has_colon" = x; then
54719    # Not in mixed or Windows style, start by that.
54720    new_path=`cmd //c echo $path`
54721  fi
54722
54723
54724  input_path="$new_path"
54725  # Check if we need to convert this using DOS-style short mode. If the path
54726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54727  # take no chances and rewrite it.
54728  # Note: m4 eats our [], so we need to use [ and ] instead.
54729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54730  if test "x$has_forbidden_chars" != x; then
54731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54733  fi
54734
54735
54736  windows_path="$new_path"
54737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54738    unix_path=`$CYGPATH -u "$windows_path"`
54739    new_path="$unix_path"
54740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54742    new_path="$unix_path"
54743  fi
54744
54745  if test "x$path" != "x$new_path"; then
54746    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54748$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54749  fi
54750
54751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54753
54754    else
54755      # We're on a unix platform. Hooray! :)
54756      path="$POTENTIAL_FREETYPE_LIB_PATH"
54757      has_space=`$ECHO "$path" | $GREP " "`
54758      if test "x$has_space" != x; then
54759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54760$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54762      fi
54763
54764      # Use eval to expand a potential ~
54765      eval path="$path"
54766      if test ! -f "$path" && test ! -d "$path"; then
54767        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54768      fi
54769
54770      if test -d "$path"; then
54771        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54772      else
54773        dir="`$DIRNAME "$path"`"
54774        base="`$BASENAME "$path"`"
54775        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54776      fi
54777    fi
54778  fi
54779
54780
54781    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54783$as_echo_n "checking for freetype includes... " >&6; }
54784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54785$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54786    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54788$as_echo_n "checking for freetype libraries... " >&6; }
54789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54790$as_echo "$FREETYPE_LIB_PATH" >&6; }
54791  fi
54792
54793            fi
54794            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
54795                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
54796              # Source is available, as a last resort try to build freetype in default location
54797
54798  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
54799  BUILD_FREETYPE=yes
54800
54801  # Check if the freetype sources are acessible..
54802  if ! test -d $FREETYPE_SRC_PATH; then
54803    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
54804$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
54805    BUILD_FREETYPE=no
54806  fi
54807  # ..and contain a vc2010 project file
54808  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
54809  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
54810    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
54811$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
54812    BUILD_FREETYPE=no
54813  fi
54814  # Now check if configure found a version of 'msbuild.exe'
54815  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
54816    { $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
54817$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;}
54818    BUILD_FREETYPE=no
54819  fi
54820
54821  # Ready to go..
54822  if test "x$BUILD_FREETYPE" = xyes; then
54823    # msbuild requires trailing slashes for output directories
54824    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
54825    freetype_lib_path_unix="$freetype_lib_path"
54826    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
54827
54828  unix_path="$vcxproj_path"
54829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54830    windows_path=`$CYGPATH -m "$unix_path"`
54831    vcxproj_path="$windows_path"
54832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54833    windows_path=`cmd //c echo $unix_path`
54834    vcxproj_path="$windows_path"
54835  fi
54836
54837
54838  unix_path="$freetype_lib_path"
54839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54840    windows_path=`$CYGPATH -m "$unix_path"`
54841    freetype_lib_path="$windows_path"
54842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54843    windows_path=`cmd //c echo $unix_path`
54844    freetype_lib_path="$windows_path"
54845  fi
54846
54847
54848  unix_path="$freetype_obj_path"
54849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54850    windows_path=`$CYGPATH -m "$unix_path"`
54851    freetype_obj_path="$windows_path"
54852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54853    windows_path=`cmd //c echo $unix_path`
54854    freetype_obj_path="$windows_path"
54855  fi
54856
54857    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54858      freetype_platform=x64
54859    else
54860      freetype_platform=win32
54861    fi
54862
54863    # The original freetype project file is for VS 2010 (i.e. 'v100'),
54864    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
54865    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
54866    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
54867    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
54868$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
54869
54870    # First we try to build the freetype.dll
54871    $ECHO -e "@echo off\n"\
54872        "$MSBUILD $vcxproj_path "\
54873        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54874        "/p:Configuration=\"Release Multithreaded\" "\
54875        "/p:Platform=$freetype_platform "\
54876        "/p:ConfigurationType=DynamicLibrary "\
54877        "/p:TargetName=freetype "\
54878        "/p:OutDir=\"$freetype_lib_path\" "\
54879        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
54880    cmd /c freetype.bat
54881
54882    if test -s "$freetype_lib_path_unix/freetype.dll"; then
54883      # If that succeeds we also build freetype.lib
54884      $ECHO -e "@echo off\n"\
54885          "$MSBUILD $vcxproj_path "\
54886          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
54887          "/p:Configuration=\"Release Multithreaded\" "\
54888          "/p:Platform=$freetype_platform "\
54889          "/p:ConfigurationType=StaticLibrary "\
54890          "/p:TargetName=freetype "\
54891          "/p:OutDir=\"$freetype_lib_path\" "\
54892          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
54893      cmd /c freetype.bat
54894
54895      if test -s "$freetype_lib_path_unix/freetype.lib"; then
54896        # Once we build both, lib and dll, set freetype lib and include path appropriately
54897        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
54898        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
54899        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
54900$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
54901      else
54902        BUILD_FREETYPE=no
54903      fi
54904    else
54905      BUILD_FREETYPE=no
54906    fi
54907  fi
54908
54909              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54910
54911  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54912  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
54913  METHOD="well-known location"
54914
54915  # Let's start with an optimistic view of the world :-)
54916  FOUND_FREETYPE=yes
54917
54918  # First look for the canonical freetype main include file ft2build.h.
54919  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54920    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54921    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54922    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54923      # Fail.
54924      FOUND_FREETYPE=no
54925    fi
54926  fi
54927
54928  if test "x$FOUND_FREETYPE" = xyes; then
54929    # Include file found, let's continue the sanity check.
54930    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54931$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54932
54933    # Reset to default value
54934    FREETYPE_BASE_NAME=freetype
54935    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54936    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54937      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54938          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54939        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54940        # for the .6 version explicitly.
54941        FREETYPE_BASE_NAME=freetype.6
54942        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54943        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54944$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54945      else
54946        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54947$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54948        FOUND_FREETYPE=no
54949      fi
54950    else
54951      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54952        # On Windows, we will need both .lib and .dll file.
54953        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54954          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54955$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54956          FOUND_FREETYPE=no
54957        fi
54958      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54959          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54960        # Found lib in isa dir, use that instead.
54961        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54962        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54963$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54964      fi
54965    fi
54966  fi
54967
54968  if test "x$FOUND_FREETYPE" = xyes; then
54969
54970  # Only process if variable expands to non-empty
54971
54972  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54974
54975  # Input might be given as Windows format, start by converting to
54976  # unix format.
54977  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54978  new_path=`$CYGPATH -u "$path"`
54979
54980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54983  # "foo.exe" is OK but "foo" is an error.
54984  #
54985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54986  # It is also a way to make sure we got the proper file name for the real test later on.
54987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54988  if test "x$test_shortpath" = x; then
54989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54990$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54991    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54992  fi
54993
54994  # Call helper function which possibly converts this using DOS-style short mode.
54995  # If so, the updated path is stored in $new_path.
54996
54997  input_path="$new_path"
54998  # Check if we need to convert this using DOS-style short mode. If the path
54999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55000  # take no chances and rewrite it.
55001  # Note: m4 eats our [], so we need to use [ and ] instead.
55002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55003  if test "x$has_forbidden_chars" != x; then
55004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55008      # Going to short mode and back again did indeed matter. Since short mode is
55009      # case insensitive, let's make it lowercase to improve readability.
55010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55011      # Now convert it back to Unix-style (cygpath)
55012      input_path=`$CYGPATH -u "$shortmode_path"`
55013      new_path="$input_path"
55014    fi
55015  fi
55016
55017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55018  if test "x$test_cygdrive_prefix" = x; then
55019    # As a simple fix, exclude /usr/bin since it's not a real path.
55020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55022      # a path prefixed by /cygdrive for fixpath to work.
55023      new_path="$CYGWIN_ROOT_PATH$input_path"
55024    fi
55025  fi
55026
55027
55028  if test "x$path" != "x$new_path"; then
55029    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55031$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55032  fi
55033
55034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55035
55036  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55037  has_colon=`$ECHO $path | $GREP ^.:`
55038  new_path="$path"
55039  if test "x$has_colon" = x; then
55040    # Not in mixed or Windows style, start by that.
55041    new_path=`cmd //c echo $path`
55042  fi
55043
55044
55045  input_path="$new_path"
55046  # Check if we need to convert this using DOS-style short mode. If the path
55047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55048  # take no chances and rewrite it.
55049  # Note: m4 eats our [], so we need to use [ and ] instead.
55050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55051  if test "x$has_forbidden_chars" != x; then
55052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55054  fi
55055
55056
55057  windows_path="$new_path"
55058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55059    unix_path=`$CYGPATH -u "$windows_path"`
55060    new_path="$unix_path"
55061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55063    new_path="$unix_path"
55064  fi
55065
55066  if test "x$path" != "x$new_path"; then
55067    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55070  fi
55071
55072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55074
55075    else
55076      # We're on a unix platform. Hooray! :)
55077      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55078      has_space=`$ECHO "$path" | $GREP " "`
55079      if test "x$has_space" != x; then
55080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55081$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55083      fi
55084
55085      # Use eval to expand a potential ~
55086      eval path="$path"
55087      if test ! -f "$path" && test ! -d "$path"; then
55088        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55089      fi
55090
55091      if test -d "$path"; then
55092        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55093      else
55094        dir="`$DIRNAME "$path"`"
55095        base="`$BASENAME "$path"`"
55096        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55097      fi
55098    fi
55099  fi
55100
55101
55102  # Only process if variable expands to non-empty
55103
55104  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55106
55107  # Input might be given as Windows format, start by converting to
55108  # unix format.
55109  path="$POTENTIAL_FREETYPE_LIB_PATH"
55110  new_path=`$CYGPATH -u "$path"`
55111
55112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55115  # "foo.exe" is OK but "foo" is an error.
55116  #
55117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55118  # It is also a way to make sure we got the proper file name for the real test later on.
55119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55120  if test "x$test_shortpath" = x; then
55121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55123    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55124  fi
55125
55126  # Call helper function which possibly converts this using DOS-style short mode.
55127  # If so, the updated path is stored in $new_path.
55128
55129  input_path="$new_path"
55130  # Check if we need to convert this using DOS-style short mode. If the path
55131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55132  # take no chances and rewrite it.
55133  # Note: m4 eats our [], so we need to use [ and ] instead.
55134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55135  if test "x$has_forbidden_chars" != x; then
55136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55140      # Going to short mode and back again did indeed matter. Since short mode is
55141      # case insensitive, let's make it lowercase to improve readability.
55142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55143      # Now convert it back to Unix-style (cygpath)
55144      input_path=`$CYGPATH -u "$shortmode_path"`
55145      new_path="$input_path"
55146    fi
55147  fi
55148
55149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55150  if test "x$test_cygdrive_prefix" = x; then
55151    # As a simple fix, exclude /usr/bin since it's not a real path.
55152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55154      # a path prefixed by /cygdrive for fixpath to work.
55155      new_path="$CYGWIN_ROOT_PATH$input_path"
55156    fi
55157  fi
55158
55159
55160  if test "x$path" != "x$new_path"; then
55161    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55164  fi
55165
55166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55167
55168  path="$POTENTIAL_FREETYPE_LIB_PATH"
55169  has_colon=`$ECHO $path | $GREP ^.:`
55170  new_path="$path"
55171  if test "x$has_colon" = x; then
55172    # Not in mixed or Windows style, start by that.
55173    new_path=`cmd //c echo $path`
55174  fi
55175
55176
55177  input_path="$new_path"
55178  # Check if we need to convert this using DOS-style short mode. If the path
55179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55180  # take no chances and rewrite it.
55181  # Note: m4 eats our [], so we need to use [ and ] instead.
55182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55183  if test "x$has_forbidden_chars" != x; then
55184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55186  fi
55187
55188
55189  windows_path="$new_path"
55190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55191    unix_path=`$CYGPATH -u "$windows_path"`
55192    new_path="$unix_path"
55193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55195    new_path="$unix_path"
55196  fi
55197
55198  if test "x$path" != "x$new_path"; then
55199    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55202  fi
55203
55204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55206
55207    else
55208      # We're on a unix platform. Hooray! :)
55209      path="$POTENTIAL_FREETYPE_LIB_PATH"
55210      has_space=`$ECHO "$path" | $GREP " "`
55211      if test "x$has_space" != x; then
55212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55215      fi
55216
55217      # Use eval to expand a potential ~
55218      eval path="$path"
55219      if test ! -f "$path" && test ! -d "$path"; then
55220        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55221      fi
55222
55223      if test -d "$path"; then
55224        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55225      else
55226        dir="`$DIRNAME "$path"`"
55227        base="`$BASENAME "$path"`"
55228        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55229      fi
55230    fi
55231  fi
55232
55233
55234    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55236$as_echo_n "checking for freetype includes... " >&6; }
55237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55238$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55239    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55241$as_echo_n "checking for freetype libraries... " >&6; }
55242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55243$as_echo "$FREETYPE_LIB_PATH" >&6; }
55244  fi
55245
55246              else
55247
55248  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55249  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
55250  METHOD="well-known location"
55251
55252  # Let's start with an optimistic view of the world :-)
55253  FOUND_FREETYPE=yes
55254
55255  # First look for the canonical freetype main include file ft2build.h.
55256  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55257    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55258    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55259    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55260      # Fail.
55261      FOUND_FREETYPE=no
55262    fi
55263  fi
55264
55265  if test "x$FOUND_FREETYPE" = xyes; then
55266    # Include file found, let's continue the sanity check.
55267    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55268$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55269
55270    # Reset to default value
55271    FREETYPE_BASE_NAME=freetype
55272    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55273    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55274      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55275          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55276        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55277        # for the .6 version explicitly.
55278        FREETYPE_BASE_NAME=freetype.6
55279        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55280        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55281$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55282      else
55283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55284$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55285        FOUND_FREETYPE=no
55286      fi
55287    else
55288      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55289        # On Windows, we will need both .lib and .dll file.
55290        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55291          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55292$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55293          FOUND_FREETYPE=no
55294        fi
55295      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55296          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55297        # Found lib in isa dir, use that instead.
55298        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55299        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55300$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55301      fi
55302    fi
55303  fi
55304
55305  if test "x$FOUND_FREETYPE" = xyes; then
55306
55307  # Only process if variable expands to non-empty
55308
55309  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55311
55312  # Input might be given as Windows format, start by converting to
55313  # unix format.
55314  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55315  new_path=`$CYGPATH -u "$path"`
55316
55317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55320  # "foo.exe" is OK but "foo" is an error.
55321  #
55322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55323  # It is also a way to make sure we got the proper file name for the real test later on.
55324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55325  if test "x$test_shortpath" = x; then
55326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55327$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55328    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55329  fi
55330
55331  # Call helper function which possibly converts this using DOS-style short mode.
55332  # If so, the updated path is stored in $new_path.
55333
55334  input_path="$new_path"
55335  # Check if we need to convert this using DOS-style short mode. If the path
55336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55337  # take no chances and rewrite it.
55338  # Note: m4 eats our [], so we need to use [ and ] instead.
55339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55340  if test "x$has_forbidden_chars" != x; then
55341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55345      # Going to short mode and back again did indeed matter. Since short mode is
55346      # case insensitive, let's make it lowercase to improve readability.
55347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55348      # Now convert it back to Unix-style (cygpath)
55349      input_path=`$CYGPATH -u "$shortmode_path"`
55350      new_path="$input_path"
55351    fi
55352  fi
55353
55354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55355  if test "x$test_cygdrive_prefix" = x; then
55356    # As a simple fix, exclude /usr/bin since it's not a real path.
55357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55359      # a path prefixed by /cygdrive for fixpath to work.
55360      new_path="$CYGWIN_ROOT_PATH$input_path"
55361    fi
55362  fi
55363
55364
55365  if test "x$path" != "x$new_path"; then
55366    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55368$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55369  fi
55370
55371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55372
55373  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55374  has_colon=`$ECHO $path | $GREP ^.:`
55375  new_path="$path"
55376  if test "x$has_colon" = x; then
55377    # Not in mixed or Windows style, start by that.
55378    new_path=`cmd //c echo $path`
55379  fi
55380
55381
55382  input_path="$new_path"
55383  # Check if we need to convert this using DOS-style short mode. If the path
55384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55385  # take no chances and rewrite it.
55386  # Note: m4 eats our [], so we need to use [ and ] instead.
55387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55388  if test "x$has_forbidden_chars" != x; then
55389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55391  fi
55392
55393
55394  windows_path="$new_path"
55395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55396    unix_path=`$CYGPATH -u "$windows_path"`
55397    new_path="$unix_path"
55398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55400    new_path="$unix_path"
55401  fi
55402
55403  if test "x$path" != "x$new_path"; then
55404    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55406$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55407  fi
55408
55409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55411
55412    else
55413      # We're on a unix platform. Hooray! :)
55414      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55415      has_space=`$ECHO "$path" | $GREP " "`
55416      if test "x$has_space" != x; then
55417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55418$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55419        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55420      fi
55421
55422      # Use eval to expand a potential ~
55423      eval path="$path"
55424      if test ! -f "$path" && test ! -d "$path"; then
55425        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55426      fi
55427
55428      if test -d "$path"; then
55429        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55430      else
55431        dir="`$DIRNAME "$path"`"
55432        base="`$BASENAME "$path"`"
55433        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55434      fi
55435    fi
55436  fi
55437
55438
55439  # Only process if variable expands to non-empty
55440
55441  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55442    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55443
55444  # Input might be given as Windows format, start by converting to
55445  # unix format.
55446  path="$POTENTIAL_FREETYPE_LIB_PATH"
55447  new_path=`$CYGPATH -u "$path"`
55448
55449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55452  # "foo.exe" is OK but "foo" is an error.
55453  #
55454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55455  # It is also a way to make sure we got the proper file name for the real test later on.
55456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55457  if test "x$test_shortpath" = x; then
55458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55459$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55460    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55461  fi
55462
55463  # Call helper function which possibly converts this using DOS-style short mode.
55464  # If so, the updated path is stored in $new_path.
55465
55466  input_path="$new_path"
55467  # Check if we need to convert this using DOS-style short mode. If the path
55468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55469  # take no chances and rewrite it.
55470  # Note: m4 eats our [], so we need to use [ and ] instead.
55471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55472  if test "x$has_forbidden_chars" != x; then
55473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55477      # Going to short mode and back again did indeed matter. Since short mode is
55478      # case insensitive, let's make it lowercase to improve readability.
55479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55480      # Now convert it back to Unix-style (cygpath)
55481      input_path=`$CYGPATH -u "$shortmode_path"`
55482      new_path="$input_path"
55483    fi
55484  fi
55485
55486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55487  if test "x$test_cygdrive_prefix" = x; then
55488    # As a simple fix, exclude /usr/bin since it's not a real path.
55489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55491      # a path prefixed by /cygdrive for fixpath to work.
55492      new_path="$CYGWIN_ROOT_PATH$input_path"
55493    fi
55494  fi
55495
55496
55497  if test "x$path" != "x$new_path"; then
55498    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55501  fi
55502
55503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55504
55505  path="$POTENTIAL_FREETYPE_LIB_PATH"
55506  has_colon=`$ECHO $path | $GREP ^.:`
55507  new_path="$path"
55508  if test "x$has_colon" = x; then
55509    # Not in mixed or Windows style, start by that.
55510    new_path=`cmd //c echo $path`
55511  fi
55512
55513
55514  input_path="$new_path"
55515  # Check if we need to convert this using DOS-style short mode. If the path
55516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55517  # take no chances and rewrite it.
55518  # Note: m4 eats our [], so we need to use [ and ] instead.
55519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55520  if test "x$has_forbidden_chars" != x; then
55521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55523  fi
55524
55525
55526  windows_path="$new_path"
55527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55528    unix_path=`$CYGPATH -u "$windows_path"`
55529    new_path="$unix_path"
55530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55532    new_path="$unix_path"
55533  fi
55534
55535  if test "x$path" != "x$new_path"; then
55536    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55538$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55539  fi
55540
55541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55543
55544    else
55545      # We're on a unix platform. Hooray! :)
55546      path="$POTENTIAL_FREETYPE_LIB_PATH"
55547      has_space=`$ECHO "$path" | $GREP " "`
55548      if test "x$has_space" != x; then
55549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55550$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55551        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55552      fi
55553
55554      # Use eval to expand a potential ~
55555      eval path="$path"
55556      if test ! -f "$path" && test ! -d "$path"; then
55557        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55558      fi
55559
55560      if test -d "$path"; then
55561        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55562      else
55563        dir="`$DIRNAME "$path"`"
55564        base="`$BASENAME "$path"`"
55565        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55566      fi
55567    fi
55568  fi
55569
55570
55571    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55573$as_echo_n "checking for freetype includes... " >&6; }
55574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55575$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55576    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55578$as_echo_n "checking for freetype libraries... " >&6; }
55579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55580$as_echo "$FREETYPE_LIB_PATH" >&6; }
55581  fi
55582
55583              fi
55584            fi
55585          fi
55586        else
55587          FREETYPE_BASE_DIR="$SYSROOT/usr"
55588
55589  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55590  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55591  METHOD="well-known location"
55592
55593  # Let's start with an optimistic view of the world :-)
55594  FOUND_FREETYPE=yes
55595
55596  # First look for the canonical freetype main include file ft2build.h.
55597  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55598    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55599    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55600    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55601      # Fail.
55602      FOUND_FREETYPE=no
55603    fi
55604  fi
55605
55606  if test "x$FOUND_FREETYPE" = xyes; then
55607    # Include file found, let's continue the sanity check.
55608    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55609$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55610
55611    # Reset to default value
55612    FREETYPE_BASE_NAME=freetype
55613    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55614    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55615      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55616          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55617        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55618        # for the .6 version explicitly.
55619        FREETYPE_BASE_NAME=freetype.6
55620        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55621        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55622$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55623      else
55624        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55625$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55626        FOUND_FREETYPE=no
55627      fi
55628    else
55629      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55630        # On Windows, we will need both .lib and .dll file.
55631        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55632          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55633$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55634          FOUND_FREETYPE=no
55635        fi
55636      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55637          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55638        # Found lib in isa dir, use that instead.
55639        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55640        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55641$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55642      fi
55643    fi
55644  fi
55645
55646  if test "x$FOUND_FREETYPE" = xyes; then
55647
55648  # Only process if variable expands to non-empty
55649
55650  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55652
55653  # Input might be given as Windows format, start by converting to
55654  # unix format.
55655  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55656  new_path=`$CYGPATH -u "$path"`
55657
55658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55661  # "foo.exe" is OK but "foo" is an error.
55662  #
55663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55664  # It is also a way to make sure we got the proper file name for the real test later on.
55665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55666  if test "x$test_shortpath" = x; then
55667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55669    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55670  fi
55671
55672  # Call helper function which possibly converts this using DOS-style short mode.
55673  # If so, the updated path is stored in $new_path.
55674
55675  input_path="$new_path"
55676  # Check if we need to convert this using DOS-style short mode. If the path
55677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55678  # take no chances and rewrite it.
55679  # Note: m4 eats our [], so we need to use [ and ] instead.
55680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55681  if test "x$has_forbidden_chars" != x; then
55682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55686      # Going to short mode and back again did indeed matter. Since short mode is
55687      # case insensitive, let's make it lowercase to improve readability.
55688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55689      # Now convert it back to Unix-style (cygpath)
55690      input_path=`$CYGPATH -u "$shortmode_path"`
55691      new_path="$input_path"
55692    fi
55693  fi
55694
55695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55696  if test "x$test_cygdrive_prefix" = x; then
55697    # As a simple fix, exclude /usr/bin since it's not a real path.
55698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55700      # a path prefixed by /cygdrive for fixpath to work.
55701      new_path="$CYGWIN_ROOT_PATH$input_path"
55702    fi
55703  fi
55704
55705
55706  if test "x$path" != "x$new_path"; then
55707    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55709$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55710  fi
55711
55712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55713
55714  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55715  has_colon=`$ECHO $path | $GREP ^.:`
55716  new_path="$path"
55717  if test "x$has_colon" = x; then
55718    # Not in mixed or Windows style, start by that.
55719    new_path=`cmd //c echo $path`
55720  fi
55721
55722
55723  input_path="$new_path"
55724  # Check if we need to convert this using DOS-style short mode. If the path
55725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55726  # take no chances and rewrite it.
55727  # Note: m4 eats our [], so we need to use [ and ] instead.
55728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55729  if test "x$has_forbidden_chars" != x; then
55730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55732  fi
55733
55734
55735  windows_path="$new_path"
55736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55737    unix_path=`$CYGPATH -u "$windows_path"`
55738    new_path="$unix_path"
55739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55741    new_path="$unix_path"
55742  fi
55743
55744  if test "x$path" != "x$new_path"; then
55745    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55747$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55748  fi
55749
55750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55752
55753    else
55754      # We're on a unix platform. Hooray! :)
55755      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55756      has_space=`$ECHO "$path" | $GREP " "`
55757      if test "x$has_space" != x; then
55758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55761      fi
55762
55763      # Use eval to expand a potential ~
55764      eval path="$path"
55765      if test ! -f "$path" && test ! -d "$path"; then
55766        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55767      fi
55768
55769      if test -d "$path"; then
55770        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55771      else
55772        dir="`$DIRNAME "$path"`"
55773        base="`$BASENAME "$path"`"
55774        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55775      fi
55776    fi
55777  fi
55778
55779
55780  # Only process if variable expands to non-empty
55781
55782  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55784
55785  # Input might be given as Windows format, start by converting to
55786  # unix format.
55787  path="$POTENTIAL_FREETYPE_LIB_PATH"
55788  new_path=`$CYGPATH -u "$path"`
55789
55790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55793  # "foo.exe" is OK but "foo" is an error.
55794  #
55795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55796  # It is also a way to make sure we got the proper file name for the real test later on.
55797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55798  if test "x$test_shortpath" = x; then
55799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55800$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55801    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55802  fi
55803
55804  # Call helper function which possibly converts this using DOS-style short mode.
55805  # If so, the updated path is stored in $new_path.
55806
55807  input_path="$new_path"
55808  # Check if we need to convert this using DOS-style short mode. If the path
55809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55810  # take no chances and rewrite it.
55811  # Note: m4 eats our [], so we need to use [ and ] instead.
55812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55813  if test "x$has_forbidden_chars" != x; then
55814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55818      # Going to short mode and back again did indeed matter. Since short mode is
55819      # case insensitive, let's make it lowercase to improve readability.
55820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55821      # Now convert it back to Unix-style (cygpath)
55822      input_path=`$CYGPATH -u "$shortmode_path"`
55823      new_path="$input_path"
55824    fi
55825  fi
55826
55827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55828  if test "x$test_cygdrive_prefix" = x; then
55829    # As a simple fix, exclude /usr/bin since it's not a real path.
55830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55832      # a path prefixed by /cygdrive for fixpath to work.
55833      new_path="$CYGWIN_ROOT_PATH$input_path"
55834    fi
55835  fi
55836
55837
55838  if test "x$path" != "x$new_path"; then
55839    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55841$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55842  fi
55843
55844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55845
55846  path="$POTENTIAL_FREETYPE_LIB_PATH"
55847  has_colon=`$ECHO $path | $GREP ^.:`
55848  new_path="$path"
55849  if test "x$has_colon" = x; then
55850    # Not in mixed or Windows style, start by that.
55851    new_path=`cmd //c echo $path`
55852  fi
55853
55854
55855  input_path="$new_path"
55856  # Check if we need to convert this using DOS-style short mode. If the path
55857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55858  # take no chances and rewrite it.
55859  # Note: m4 eats our [], so we need to use [ and ] instead.
55860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55861  if test "x$has_forbidden_chars" != x; then
55862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55864  fi
55865
55866
55867  windows_path="$new_path"
55868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55869    unix_path=`$CYGPATH -u "$windows_path"`
55870    new_path="$unix_path"
55871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55873    new_path="$unix_path"
55874  fi
55875
55876  if test "x$path" != "x$new_path"; then
55877    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55879$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55880  fi
55881
55882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55884
55885    else
55886      # We're on a unix platform. Hooray! :)
55887      path="$POTENTIAL_FREETYPE_LIB_PATH"
55888      has_space=`$ECHO "$path" | $GREP " "`
55889      if test "x$has_space" != x; then
55890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55892        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55893      fi
55894
55895      # Use eval to expand a potential ~
55896      eval path="$path"
55897      if test ! -f "$path" && test ! -d "$path"; then
55898        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55899      fi
55900
55901      if test -d "$path"; then
55902        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55903      else
55904        dir="`$DIRNAME "$path"`"
55905        base="`$BASENAME "$path"`"
55906        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55907      fi
55908    fi
55909  fi
55910
55911
55912    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55914$as_echo_n "checking for freetype includes... " >&6; }
55915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55916$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55917    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55919$as_echo_n "checking for freetype libraries... " >&6; }
55920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55921$as_echo "$FREETYPE_LIB_PATH" >&6; }
55922  fi
55923
55924
55925          if test "x$FOUND_FREETYPE" != xyes; then
55926            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
55927
55928  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55929  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
55930  METHOD="well-known location"
55931
55932  # Let's start with an optimistic view of the world :-)
55933  FOUND_FREETYPE=yes
55934
55935  # First look for the canonical freetype main include file ft2build.h.
55936  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55937    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55938    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55939    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55940      # Fail.
55941      FOUND_FREETYPE=no
55942    fi
55943  fi
55944
55945  if test "x$FOUND_FREETYPE" = xyes; then
55946    # Include file found, let's continue the sanity check.
55947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55948$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55949
55950    # Reset to default value
55951    FREETYPE_BASE_NAME=freetype
55952    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55953    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55954      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55955          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55956        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55957        # for the .6 version explicitly.
55958        FREETYPE_BASE_NAME=freetype.6
55959        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55960        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55961$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55962      else
55963        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55964$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55965        FOUND_FREETYPE=no
55966      fi
55967    else
55968      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55969        # On Windows, we will need both .lib and .dll file.
55970        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55971          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55972$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55973          FOUND_FREETYPE=no
55974        fi
55975      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55976          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55977        # Found lib in isa dir, use that instead.
55978        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55979        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55980$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55981      fi
55982    fi
55983  fi
55984
55985  if test "x$FOUND_FREETYPE" = xyes; then
55986
55987  # Only process if variable expands to non-empty
55988
55989  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55991
55992  # Input might be given as Windows format, start by converting to
55993  # unix format.
55994  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55995  new_path=`$CYGPATH -u "$path"`
55996
55997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56000  # "foo.exe" is OK but "foo" is an error.
56001  #
56002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56003  # It is also a way to make sure we got the proper file name for the real test later on.
56004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56005  if test "x$test_shortpath" = x; then
56006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56007$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56008    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56009  fi
56010
56011  # Call helper function which possibly converts this using DOS-style short mode.
56012  # If so, the updated path is stored in $new_path.
56013
56014  input_path="$new_path"
56015  # Check if we need to convert this using DOS-style short mode. If the path
56016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56017  # take no chances and rewrite it.
56018  # Note: m4 eats our [], so we need to use [ and ] instead.
56019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56020  if test "x$has_forbidden_chars" != x; then
56021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56025      # Going to short mode and back again did indeed matter. Since short mode is
56026      # case insensitive, let's make it lowercase to improve readability.
56027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56028      # Now convert it back to Unix-style (cygpath)
56029      input_path=`$CYGPATH -u "$shortmode_path"`
56030      new_path="$input_path"
56031    fi
56032  fi
56033
56034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56035  if test "x$test_cygdrive_prefix" = x; then
56036    # As a simple fix, exclude /usr/bin since it's not a real path.
56037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56039      # a path prefixed by /cygdrive for fixpath to work.
56040      new_path="$CYGWIN_ROOT_PATH$input_path"
56041    fi
56042  fi
56043
56044
56045  if test "x$path" != "x$new_path"; then
56046    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56048$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56049  fi
56050
56051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56052
56053  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56054  has_colon=`$ECHO $path | $GREP ^.:`
56055  new_path="$path"
56056  if test "x$has_colon" = x; then
56057    # Not in mixed or Windows style, start by that.
56058    new_path=`cmd //c echo $path`
56059  fi
56060
56061
56062  input_path="$new_path"
56063  # Check if we need to convert this using DOS-style short mode. If the path
56064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56065  # take no chances and rewrite it.
56066  # Note: m4 eats our [], so we need to use [ and ] instead.
56067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56068  if test "x$has_forbidden_chars" != x; then
56069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56071  fi
56072
56073
56074  windows_path="$new_path"
56075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56076    unix_path=`$CYGPATH -u "$windows_path"`
56077    new_path="$unix_path"
56078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56080    new_path="$unix_path"
56081  fi
56082
56083  if test "x$path" != "x$new_path"; then
56084    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56087  fi
56088
56089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56091
56092    else
56093      # We're on a unix platform. Hooray! :)
56094      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56095      has_space=`$ECHO "$path" | $GREP " "`
56096      if test "x$has_space" != x; then
56097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56100      fi
56101
56102      # Use eval to expand a potential ~
56103      eval path="$path"
56104      if test ! -f "$path" && test ! -d "$path"; then
56105        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56106      fi
56107
56108      if test -d "$path"; then
56109        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56110      else
56111        dir="`$DIRNAME "$path"`"
56112        base="`$BASENAME "$path"`"
56113        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56114      fi
56115    fi
56116  fi
56117
56118
56119  # Only process if variable expands to non-empty
56120
56121  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56123
56124  # Input might be given as Windows format, start by converting to
56125  # unix format.
56126  path="$POTENTIAL_FREETYPE_LIB_PATH"
56127  new_path=`$CYGPATH -u "$path"`
56128
56129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56132  # "foo.exe" is OK but "foo" is an error.
56133  #
56134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56135  # It is also a way to make sure we got the proper file name for the real test later on.
56136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56137  if test "x$test_shortpath" = x; then
56138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56139$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56140    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56141  fi
56142
56143  # Call helper function which possibly converts this using DOS-style short mode.
56144  # If so, the updated path is stored in $new_path.
56145
56146  input_path="$new_path"
56147  # Check if we need to convert this using DOS-style short mode. If the path
56148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56149  # take no chances and rewrite it.
56150  # Note: m4 eats our [], so we need to use [ and ] instead.
56151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56152  if test "x$has_forbidden_chars" != x; then
56153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56157      # Going to short mode and back again did indeed matter. Since short mode is
56158      # case insensitive, let's make it lowercase to improve readability.
56159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56160      # Now convert it back to Unix-style (cygpath)
56161      input_path=`$CYGPATH -u "$shortmode_path"`
56162      new_path="$input_path"
56163    fi
56164  fi
56165
56166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56167  if test "x$test_cygdrive_prefix" = x; then
56168    # As a simple fix, exclude /usr/bin since it's not a real path.
56169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56171      # a path prefixed by /cygdrive for fixpath to work.
56172      new_path="$CYGWIN_ROOT_PATH$input_path"
56173    fi
56174  fi
56175
56176
56177  if test "x$path" != "x$new_path"; then
56178    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56181  fi
56182
56183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56184
56185  path="$POTENTIAL_FREETYPE_LIB_PATH"
56186  has_colon=`$ECHO $path | $GREP ^.:`
56187  new_path="$path"
56188  if test "x$has_colon" = x; then
56189    # Not in mixed or Windows style, start by that.
56190    new_path=`cmd //c echo $path`
56191  fi
56192
56193
56194  input_path="$new_path"
56195  # Check if we need to convert this using DOS-style short mode. If the path
56196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56197  # take no chances and rewrite it.
56198  # Note: m4 eats our [], so we need to use [ and ] instead.
56199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56200  if test "x$has_forbidden_chars" != x; then
56201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56203  fi
56204
56205
56206  windows_path="$new_path"
56207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56208    unix_path=`$CYGPATH -u "$windows_path"`
56209    new_path="$unix_path"
56210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56212    new_path="$unix_path"
56213  fi
56214
56215  if test "x$path" != "x$new_path"; then
56216    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56219  fi
56220
56221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56223
56224    else
56225      # We're on a unix platform. Hooray! :)
56226      path="$POTENTIAL_FREETYPE_LIB_PATH"
56227      has_space=`$ECHO "$path" | $GREP " "`
56228      if test "x$has_space" != x; then
56229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56232      fi
56233
56234      # Use eval to expand a potential ~
56235      eval path="$path"
56236      if test ! -f "$path" && test ! -d "$path"; then
56237        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56238      fi
56239
56240      if test -d "$path"; then
56241        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56242      else
56243        dir="`$DIRNAME "$path"`"
56244        base="`$BASENAME "$path"`"
56245        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56246      fi
56247    fi
56248  fi
56249
56250
56251    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56253$as_echo_n "checking for freetype includes... " >&6; }
56254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56255$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56256    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56258$as_echo_n "checking for freetype libraries... " >&6; }
56259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56260$as_echo "$FREETYPE_LIB_PATH" >&6; }
56261  fi
56262
56263          fi
56264
56265          if test "x$FOUND_FREETYPE" != xyes; then
56266            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
56267
56268  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56269  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
56270  METHOD="well-known location"
56271
56272  # Let's start with an optimistic view of the world :-)
56273  FOUND_FREETYPE=yes
56274
56275  # First look for the canonical freetype main include file ft2build.h.
56276  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56277    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56278    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56279    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56280      # Fail.
56281      FOUND_FREETYPE=no
56282    fi
56283  fi
56284
56285  if test "x$FOUND_FREETYPE" = xyes; then
56286    # Include file found, let's continue the sanity check.
56287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56288$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56289
56290    # Reset to default value
56291    FREETYPE_BASE_NAME=freetype
56292    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56293    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56294      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56295          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56296        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56297        # for the .6 version explicitly.
56298        FREETYPE_BASE_NAME=freetype.6
56299        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56300        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56301$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56302      else
56303        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56304$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56305        FOUND_FREETYPE=no
56306      fi
56307    else
56308      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56309        # On Windows, we will need both .lib and .dll file.
56310        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56311          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56312$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56313          FOUND_FREETYPE=no
56314        fi
56315      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56316          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56317        # Found lib in isa dir, use that instead.
56318        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56319        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56320$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56321      fi
56322    fi
56323  fi
56324
56325  if test "x$FOUND_FREETYPE" = xyes; then
56326
56327  # Only process if variable expands to non-empty
56328
56329  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56331
56332  # Input might be given as Windows format, start by converting to
56333  # unix format.
56334  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56335  new_path=`$CYGPATH -u "$path"`
56336
56337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56340  # "foo.exe" is OK but "foo" is an error.
56341  #
56342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56343  # It is also a way to make sure we got the proper file name for the real test later on.
56344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56345  if test "x$test_shortpath" = x; then
56346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56347$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56348    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56349  fi
56350
56351  # Call helper function which possibly converts this using DOS-style short mode.
56352  # If so, the updated path is stored in $new_path.
56353
56354  input_path="$new_path"
56355  # Check if we need to convert this using DOS-style short mode. If the path
56356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56357  # take no chances and rewrite it.
56358  # Note: m4 eats our [], so we need to use [ and ] instead.
56359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56360  if test "x$has_forbidden_chars" != x; then
56361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56365      # Going to short mode and back again did indeed matter. Since short mode is
56366      # case insensitive, let's make it lowercase to improve readability.
56367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56368      # Now convert it back to Unix-style (cygpath)
56369      input_path=`$CYGPATH -u "$shortmode_path"`
56370      new_path="$input_path"
56371    fi
56372  fi
56373
56374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56375  if test "x$test_cygdrive_prefix" = x; then
56376    # As a simple fix, exclude /usr/bin since it's not a real path.
56377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56379      # a path prefixed by /cygdrive for fixpath to work.
56380      new_path="$CYGWIN_ROOT_PATH$input_path"
56381    fi
56382  fi
56383
56384
56385  if test "x$path" != "x$new_path"; then
56386    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56388$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56389  fi
56390
56391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56392
56393  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56394  has_colon=`$ECHO $path | $GREP ^.:`
56395  new_path="$path"
56396  if test "x$has_colon" = x; then
56397    # Not in mixed or Windows style, start by that.
56398    new_path=`cmd //c echo $path`
56399  fi
56400
56401
56402  input_path="$new_path"
56403  # Check if we need to convert this using DOS-style short mode. If the path
56404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56405  # take no chances and rewrite it.
56406  # Note: m4 eats our [], so we need to use [ and ] instead.
56407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56408  if test "x$has_forbidden_chars" != x; then
56409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56411  fi
56412
56413
56414  windows_path="$new_path"
56415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56416    unix_path=`$CYGPATH -u "$windows_path"`
56417    new_path="$unix_path"
56418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56420    new_path="$unix_path"
56421  fi
56422
56423  if test "x$path" != "x$new_path"; then
56424    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56426$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56427  fi
56428
56429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56431
56432    else
56433      # We're on a unix platform. Hooray! :)
56434      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56435      has_space=`$ECHO "$path" | $GREP " "`
56436      if test "x$has_space" != x; then
56437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56438$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56440      fi
56441
56442      # Use eval to expand a potential ~
56443      eval path="$path"
56444      if test ! -f "$path" && test ! -d "$path"; then
56445        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56446      fi
56447
56448      if test -d "$path"; then
56449        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56450      else
56451        dir="`$DIRNAME "$path"`"
56452        base="`$BASENAME "$path"`"
56453        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56454      fi
56455    fi
56456  fi
56457
56458
56459  # Only process if variable expands to non-empty
56460
56461  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56463
56464  # Input might be given as Windows format, start by converting to
56465  # unix format.
56466  path="$POTENTIAL_FREETYPE_LIB_PATH"
56467  new_path=`$CYGPATH -u "$path"`
56468
56469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56472  # "foo.exe" is OK but "foo" is an error.
56473  #
56474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56475  # It is also a way to make sure we got the proper file name for the real test later on.
56476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56477  if test "x$test_shortpath" = x; then
56478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56479$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56480    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56481  fi
56482
56483  # Call helper function which possibly converts this using DOS-style short mode.
56484  # If so, the updated path is stored in $new_path.
56485
56486  input_path="$new_path"
56487  # Check if we need to convert this using DOS-style short mode. If the path
56488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56489  # take no chances and rewrite it.
56490  # Note: m4 eats our [], so we need to use [ and ] instead.
56491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56492  if test "x$has_forbidden_chars" != x; then
56493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56497      # Going to short mode and back again did indeed matter. Since short mode is
56498      # case insensitive, let's make it lowercase to improve readability.
56499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56500      # Now convert it back to Unix-style (cygpath)
56501      input_path=`$CYGPATH -u "$shortmode_path"`
56502      new_path="$input_path"
56503    fi
56504  fi
56505
56506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56507  if test "x$test_cygdrive_prefix" = x; then
56508    # As a simple fix, exclude /usr/bin since it's not a real path.
56509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56511      # a path prefixed by /cygdrive for fixpath to work.
56512      new_path="$CYGWIN_ROOT_PATH$input_path"
56513    fi
56514  fi
56515
56516
56517  if test "x$path" != "x$new_path"; then
56518    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56520$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56521  fi
56522
56523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56524
56525  path="$POTENTIAL_FREETYPE_LIB_PATH"
56526  has_colon=`$ECHO $path | $GREP ^.:`
56527  new_path="$path"
56528  if test "x$has_colon" = x; then
56529    # Not in mixed or Windows style, start by that.
56530    new_path=`cmd //c echo $path`
56531  fi
56532
56533
56534  input_path="$new_path"
56535  # Check if we need to convert this using DOS-style short mode. If the path
56536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56537  # take no chances and rewrite it.
56538  # Note: m4 eats our [], so we need to use [ and ] instead.
56539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56540  if test "x$has_forbidden_chars" != x; then
56541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56543  fi
56544
56545
56546  windows_path="$new_path"
56547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56548    unix_path=`$CYGPATH -u "$windows_path"`
56549    new_path="$unix_path"
56550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56552    new_path="$unix_path"
56553  fi
56554
56555  if test "x$path" != "x$new_path"; then
56556    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56559  fi
56560
56561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56563
56564    else
56565      # We're on a unix platform. Hooray! :)
56566      path="$POTENTIAL_FREETYPE_LIB_PATH"
56567      has_space=`$ECHO "$path" | $GREP " "`
56568      if test "x$has_space" != x; then
56569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56570$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56571        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56572      fi
56573
56574      # Use eval to expand a potential ~
56575      eval path="$path"
56576      if test ! -f "$path" && test ! -d "$path"; then
56577        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56578      fi
56579
56580      if test -d "$path"; then
56581        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56582      else
56583        dir="`$DIRNAME "$path"`"
56584        base="`$BASENAME "$path"`"
56585        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56586      fi
56587    fi
56588  fi
56589
56590
56591    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56593$as_echo_n "checking for freetype includes... " >&6; }
56594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56595$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56596    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56598$as_echo_n "checking for freetype libraries... " >&6; }
56599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56600$as_echo "$FREETYPE_LIB_PATH" >&6; }
56601  fi
56602
56603          fi
56604
56605          if test "x$FOUND_FREETYPE" != xyes; then
56606            FREETYPE_BASE_DIR="$SYSROOT/usr"
56607            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56608
56609  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56610  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
56611  METHOD="well-known location"
56612
56613  # Let's start with an optimistic view of the world :-)
56614  FOUND_FREETYPE=yes
56615
56616  # First look for the canonical freetype main include file ft2build.h.
56617  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56618    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56619    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56620    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56621      # Fail.
56622      FOUND_FREETYPE=no
56623    fi
56624  fi
56625
56626  if test "x$FOUND_FREETYPE" = xyes; then
56627    # Include file found, let's continue the sanity check.
56628    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56629$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56630
56631    # Reset to default value
56632    FREETYPE_BASE_NAME=freetype
56633    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56634    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56635      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56636          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56637        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56638        # for the .6 version explicitly.
56639        FREETYPE_BASE_NAME=freetype.6
56640        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56641        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56642$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56643      else
56644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56645$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56646        FOUND_FREETYPE=no
56647      fi
56648    else
56649      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56650        # On Windows, we will need both .lib and .dll file.
56651        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56652          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56653$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56654          FOUND_FREETYPE=no
56655        fi
56656      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56657          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56658        # Found lib in isa dir, use that instead.
56659        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56660        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56661$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56662      fi
56663    fi
56664  fi
56665
56666  if test "x$FOUND_FREETYPE" = xyes; then
56667
56668  # Only process if variable expands to non-empty
56669
56670  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56672
56673  # Input might be given as Windows format, start by converting to
56674  # unix format.
56675  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56676  new_path=`$CYGPATH -u "$path"`
56677
56678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56681  # "foo.exe" is OK but "foo" is an error.
56682  #
56683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56684  # It is also a way to make sure we got the proper file name for the real test later on.
56685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56686  if test "x$test_shortpath" = x; then
56687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56689    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56690  fi
56691
56692  # Call helper function which possibly converts this using DOS-style short mode.
56693  # If so, the updated path is stored in $new_path.
56694
56695  input_path="$new_path"
56696  # Check if we need to convert this using DOS-style short mode. If the path
56697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56698  # take no chances and rewrite it.
56699  # Note: m4 eats our [], so we need to use [ and ] instead.
56700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56701  if test "x$has_forbidden_chars" != x; then
56702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56706      # Going to short mode and back again did indeed matter. Since short mode is
56707      # case insensitive, let's make it lowercase to improve readability.
56708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56709      # Now convert it back to Unix-style (cygpath)
56710      input_path=`$CYGPATH -u "$shortmode_path"`
56711      new_path="$input_path"
56712    fi
56713  fi
56714
56715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56716  if test "x$test_cygdrive_prefix" = x; then
56717    # As a simple fix, exclude /usr/bin since it's not a real path.
56718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56720      # a path prefixed by /cygdrive for fixpath to work.
56721      new_path="$CYGWIN_ROOT_PATH$input_path"
56722    fi
56723  fi
56724
56725
56726  if test "x$path" != "x$new_path"; then
56727    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56730  fi
56731
56732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56733
56734  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56735  has_colon=`$ECHO $path | $GREP ^.:`
56736  new_path="$path"
56737  if test "x$has_colon" = x; then
56738    # Not in mixed or Windows style, start by that.
56739    new_path=`cmd //c echo $path`
56740  fi
56741
56742
56743  input_path="$new_path"
56744  # Check if we need to convert this using DOS-style short mode. If the path
56745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56746  # take no chances and rewrite it.
56747  # Note: m4 eats our [], so we need to use [ and ] instead.
56748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56749  if test "x$has_forbidden_chars" != x; then
56750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56752  fi
56753
56754
56755  windows_path="$new_path"
56756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56757    unix_path=`$CYGPATH -u "$windows_path"`
56758    new_path="$unix_path"
56759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56761    new_path="$unix_path"
56762  fi
56763
56764  if test "x$path" != "x$new_path"; then
56765    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56767$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56768  fi
56769
56770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56772
56773    else
56774      # We're on a unix platform. Hooray! :)
56775      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56776      has_space=`$ECHO "$path" | $GREP " "`
56777      if test "x$has_space" != x; then
56778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56779$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56781      fi
56782
56783      # Use eval to expand a potential ~
56784      eval path="$path"
56785      if test ! -f "$path" && test ! -d "$path"; then
56786        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56787      fi
56788
56789      if test -d "$path"; then
56790        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56791      else
56792        dir="`$DIRNAME "$path"`"
56793        base="`$BASENAME "$path"`"
56794        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56795      fi
56796    fi
56797  fi
56798
56799
56800  # Only process if variable expands to non-empty
56801
56802  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56804
56805  # Input might be given as Windows format, start by converting to
56806  # unix format.
56807  path="$POTENTIAL_FREETYPE_LIB_PATH"
56808  new_path=`$CYGPATH -u "$path"`
56809
56810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56813  # "foo.exe" is OK but "foo" is an error.
56814  #
56815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56816  # It is also a way to make sure we got the proper file name for the real test later on.
56817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56818  if test "x$test_shortpath" = x; then
56819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56821    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56822  fi
56823
56824  # Call helper function which possibly converts this using DOS-style short mode.
56825  # If so, the updated path is stored in $new_path.
56826
56827  input_path="$new_path"
56828  # Check if we need to convert this using DOS-style short mode. If the path
56829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56830  # take no chances and rewrite it.
56831  # Note: m4 eats our [], so we need to use [ and ] instead.
56832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56833  if test "x$has_forbidden_chars" != x; then
56834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56838      # Going to short mode and back again did indeed matter. Since short mode is
56839      # case insensitive, let's make it lowercase to improve readability.
56840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56841      # Now convert it back to Unix-style (cygpath)
56842      input_path=`$CYGPATH -u "$shortmode_path"`
56843      new_path="$input_path"
56844    fi
56845  fi
56846
56847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56848  if test "x$test_cygdrive_prefix" = x; then
56849    # As a simple fix, exclude /usr/bin since it's not a real path.
56850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56852      # a path prefixed by /cygdrive for fixpath to work.
56853      new_path="$CYGWIN_ROOT_PATH$input_path"
56854    fi
56855  fi
56856
56857
56858  if test "x$path" != "x$new_path"; then
56859    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56861$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56862  fi
56863
56864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56865
56866  path="$POTENTIAL_FREETYPE_LIB_PATH"
56867  has_colon=`$ECHO $path | $GREP ^.:`
56868  new_path="$path"
56869  if test "x$has_colon" = x; then
56870    # Not in mixed or Windows style, start by that.
56871    new_path=`cmd //c echo $path`
56872  fi
56873
56874
56875  input_path="$new_path"
56876  # Check if we need to convert this using DOS-style short mode. If the path
56877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56878  # take no chances and rewrite it.
56879  # Note: m4 eats our [], so we need to use [ and ] instead.
56880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56881  if test "x$has_forbidden_chars" != x; then
56882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56884  fi
56885
56886
56887  windows_path="$new_path"
56888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56889    unix_path=`$CYGPATH -u "$windows_path"`
56890    new_path="$unix_path"
56891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56893    new_path="$unix_path"
56894  fi
56895
56896  if test "x$path" != "x$new_path"; then
56897    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56899$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56900  fi
56901
56902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56904
56905    else
56906      # We're on a unix platform. Hooray! :)
56907      path="$POTENTIAL_FREETYPE_LIB_PATH"
56908      has_space=`$ECHO "$path" | $GREP " "`
56909      if test "x$has_space" != x; then
56910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56911$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56913      fi
56914
56915      # Use eval to expand a potential ~
56916      eval path="$path"
56917      if test ! -f "$path" && test ! -d "$path"; then
56918        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56919      fi
56920
56921      if test -d "$path"; then
56922        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
56923      else
56924        dir="`$DIRNAME "$path"`"
56925        base="`$BASENAME "$path"`"
56926        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56927      fi
56928    fi
56929  fi
56930
56931
56932    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56933    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
56934$as_echo_n "checking for freetype includes... " >&6; }
56935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
56936$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
56937    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
56939$as_echo_n "checking for freetype libraries... " >&6; }
56940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
56941$as_echo "$FREETYPE_LIB_PATH" >&6; }
56942  fi
56943
56944            else
56945
56946  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
56947  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
56948  METHOD="well-known location"
56949
56950  # Let's start with an optimistic view of the world :-)
56951  FOUND_FREETYPE=yes
56952
56953  # First look for the canonical freetype main include file ft2build.h.
56954  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56955    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56956    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56957    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56958      # Fail.
56959      FOUND_FREETYPE=no
56960    fi
56961  fi
56962
56963  if test "x$FOUND_FREETYPE" = xyes; then
56964    # Include file found, let's continue the sanity check.
56965    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56966$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56967
56968    # Reset to default value
56969    FREETYPE_BASE_NAME=freetype
56970    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56971    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56972      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56973          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56974        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56975        # for the .6 version explicitly.
56976        FREETYPE_BASE_NAME=freetype.6
56977        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56978        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56979$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56980      else
56981        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56982$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56983        FOUND_FREETYPE=no
56984      fi
56985    else
56986      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56987        # On Windows, we will need both .lib and .dll file.
56988        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56989          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56990$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56991          FOUND_FREETYPE=no
56992        fi
56993      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56994          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56995        # Found lib in isa dir, use that instead.
56996        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56997        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56998$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56999      fi
57000    fi
57001  fi
57002
57003  if test "x$FOUND_FREETYPE" = xyes; then
57004
57005  # Only process if variable expands to non-empty
57006
57007  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57008    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57009
57010  # Input might be given as Windows format, start by converting to
57011  # unix format.
57012  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57013  new_path=`$CYGPATH -u "$path"`
57014
57015  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57016  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57017  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57018  # "foo.exe" is OK but "foo" is an error.
57019  #
57020  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57021  # It is also a way to make sure we got the proper file name for the real test later on.
57022  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57023  if test "x$test_shortpath" = x; then
57024    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57025$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57026    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57027  fi
57028
57029  # Call helper function which possibly converts this using DOS-style short mode.
57030  # If so, the updated path is stored in $new_path.
57031
57032  input_path="$new_path"
57033  # Check if we need to convert this using DOS-style short mode. If the path
57034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57035  # take no chances and rewrite it.
57036  # Note: m4 eats our [], so we need to use [ and ] instead.
57037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57038  if test "x$has_forbidden_chars" != x; then
57039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57040    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57041    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57042    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57043      # Going to short mode and back again did indeed matter. Since short mode is
57044      # case insensitive, let's make it lowercase to improve readability.
57045      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57046      # Now convert it back to Unix-style (cygpath)
57047      input_path=`$CYGPATH -u "$shortmode_path"`
57048      new_path="$input_path"
57049    fi
57050  fi
57051
57052  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57053  if test "x$test_cygdrive_prefix" = x; then
57054    # As a simple fix, exclude /usr/bin since it's not a real path.
57055    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57056      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57057      # a path prefixed by /cygdrive for fixpath to work.
57058      new_path="$CYGWIN_ROOT_PATH$input_path"
57059    fi
57060  fi
57061
57062
57063  if test "x$path" != "x$new_path"; then
57064    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57066$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57067  fi
57068
57069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57070
57071  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57072  has_colon=`$ECHO $path | $GREP ^.:`
57073  new_path="$path"
57074  if test "x$has_colon" = x; then
57075    # Not in mixed or Windows style, start by that.
57076    new_path=`cmd //c echo $path`
57077  fi
57078
57079
57080  input_path="$new_path"
57081  # Check if we need to convert this using DOS-style short mode. If the path
57082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57083  # take no chances and rewrite it.
57084  # Note: m4 eats our [], so we need to use [ and ] instead.
57085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57086  if test "x$has_forbidden_chars" != x; then
57087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57089  fi
57090
57091
57092  windows_path="$new_path"
57093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57094    unix_path=`$CYGPATH -u "$windows_path"`
57095    new_path="$unix_path"
57096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57098    new_path="$unix_path"
57099  fi
57100
57101  if test "x$path" != "x$new_path"; then
57102    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57104$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57105  fi
57106
57107  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57108  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57109
57110    else
57111      # We're on a unix platform. Hooray! :)
57112      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57113      has_space=`$ECHO "$path" | $GREP " "`
57114      if test "x$has_space" != x; then
57115        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57116$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57117        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57118      fi
57119
57120      # Use eval to expand a potential ~
57121      eval path="$path"
57122      if test ! -f "$path" && test ! -d "$path"; then
57123        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57124      fi
57125
57126      if test -d "$path"; then
57127        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57128      else
57129        dir="`$DIRNAME "$path"`"
57130        base="`$BASENAME "$path"`"
57131        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57132      fi
57133    fi
57134  fi
57135
57136
57137  # Only process if variable expands to non-empty
57138
57139  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57141
57142  # Input might be given as Windows format, start by converting to
57143  # unix format.
57144  path="$POTENTIAL_FREETYPE_LIB_PATH"
57145  new_path=`$CYGPATH -u "$path"`
57146
57147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57150  # "foo.exe" is OK but "foo" is an error.
57151  #
57152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57153  # It is also a way to make sure we got the proper file name for the real test later on.
57154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57155  if test "x$test_shortpath" = x; then
57156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57158    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57159  fi
57160
57161  # Call helper function which possibly converts this using DOS-style short mode.
57162  # If so, the updated path is stored in $new_path.
57163
57164  input_path="$new_path"
57165  # Check if we need to convert this using DOS-style short mode. If the path
57166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57167  # take no chances and rewrite it.
57168  # Note: m4 eats our [], so we need to use [ and ] instead.
57169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57170  if test "x$has_forbidden_chars" != x; then
57171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57175      # Going to short mode and back again did indeed matter. Since short mode is
57176      # case insensitive, let's make it lowercase to improve readability.
57177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57178      # Now convert it back to Unix-style (cygpath)
57179      input_path=`$CYGPATH -u "$shortmode_path"`
57180      new_path="$input_path"
57181    fi
57182  fi
57183
57184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57185  if test "x$test_cygdrive_prefix" = x; then
57186    # As a simple fix, exclude /usr/bin since it's not a real path.
57187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57189      # a path prefixed by /cygdrive for fixpath to work.
57190      new_path="$CYGWIN_ROOT_PATH$input_path"
57191    fi
57192  fi
57193
57194
57195  if test "x$path" != "x$new_path"; then
57196    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57198$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57199  fi
57200
57201    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57202
57203  path="$POTENTIAL_FREETYPE_LIB_PATH"
57204  has_colon=`$ECHO $path | $GREP ^.:`
57205  new_path="$path"
57206  if test "x$has_colon" = x; then
57207    # Not in mixed or Windows style, start by that.
57208    new_path=`cmd //c echo $path`
57209  fi
57210
57211
57212  input_path="$new_path"
57213  # Check if we need to convert this using DOS-style short mode. If the path
57214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57215  # take no chances and rewrite it.
57216  # Note: m4 eats our [], so we need to use [ and ] instead.
57217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57218  if test "x$has_forbidden_chars" != x; then
57219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57221  fi
57222
57223
57224  windows_path="$new_path"
57225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57226    unix_path=`$CYGPATH -u "$windows_path"`
57227    new_path="$unix_path"
57228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57230    new_path="$unix_path"
57231  fi
57232
57233  if test "x$path" != "x$new_path"; then
57234    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57237  fi
57238
57239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57241
57242    else
57243      # We're on a unix platform. Hooray! :)
57244      path="$POTENTIAL_FREETYPE_LIB_PATH"
57245      has_space=`$ECHO "$path" | $GREP " "`
57246      if test "x$has_space" != x; then
57247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57248$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57249        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57250      fi
57251
57252      # Use eval to expand a potential ~
57253      eval path="$path"
57254      if test ! -f "$path" && test ! -d "$path"; then
57255        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57256      fi
57257
57258      if test -d "$path"; then
57259        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57260      else
57261        dir="`$DIRNAME "$path"`"
57262        base="`$BASENAME "$path"`"
57263        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57264      fi
57265    fi
57266  fi
57267
57268
57269    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57271$as_echo_n "checking for freetype includes... " >&6; }
57272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57273$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57274    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57276$as_echo_n "checking for freetype libraries... " >&6; }
57277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57278$as_echo "$FREETYPE_LIB_PATH" >&6; }
57279  fi
57280
57281              if test "x$FOUND_FREETYPE" != xyes; then
57282
57283  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57284  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
57285  METHOD="well-known location"
57286
57287  # Let's start with an optimistic view of the world :-)
57288  FOUND_FREETYPE=yes
57289
57290  # First look for the canonical freetype main include file ft2build.h.
57291  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57292    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57293    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57294    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57295      # Fail.
57296      FOUND_FREETYPE=no
57297    fi
57298  fi
57299
57300  if test "x$FOUND_FREETYPE" = xyes; then
57301    # Include file found, let's continue the sanity check.
57302    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57303$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57304
57305    # Reset to default value
57306    FREETYPE_BASE_NAME=freetype
57307    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57308    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57309      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57310          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57311        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57312        # for the .6 version explicitly.
57313        FREETYPE_BASE_NAME=freetype.6
57314        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57315        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57316$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57317      else
57318        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57319$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57320        FOUND_FREETYPE=no
57321      fi
57322    else
57323      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57324        # On Windows, we will need both .lib and .dll file.
57325        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57326          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57327$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57328          FOUND_FREETYPE=no
57329        fi
57330      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57331          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57332        # Found lib in isa dir, use that instead.
57333        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57334        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57335$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57336      fi
57337    fi
57338  fi
57339
57340  if test "x$FOUND_FREETYPE" = xyes; then
57341
57342  # Only process if variable expands to non-empty
57343
57344  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57346
57347  # Input might be given as Windows format, start by converting to
57348  # unix format.
57349  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57350  new_path=`$CYGPATH -u "$path"`
57351
57352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57355  # "foo.exe" is OK but "foo" is an error.
57356  #
57357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57358  # It is also a way to make sure we got the proper file name for the real test later on.
57359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57360  if test "x$test_shortpath" = x; then
57361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57362$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57363    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57364  fi
57365
57366  # Call helper function which possibly converts this using DOS-style short mode.
57367  # If so, the updated path is stored in $new_path.
57368
57369  input_path="$new_path"
57370  # Check if we need to convert this using DOS-style short mode. If the path
57371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57372  # take no chances and rewrite it.
57373  # Note: m4 eats our [], so we need to use [ and ] instead.
57374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57375  if test "x$has_forbidden_chars" != x; then
57376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57380      # Going to short mode and back again did indeed matter. Since short mode is
57381      # case insensitive, let's make it lowercase to improve readability.
57382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57383      # Now convert it back to Unix-style (cygpath)
57384      input_path=`$CYGPATH -u "$shortmode_path"`
57385      new_path="$input_path"
57386    fi
57387  fi
57388
57389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57390  if test "x$test_cygdrive_prefix" = x; then
57391    # As a simple fix, exclude /usr/bin since it's not a real path.
57392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57394      # a path prefixed by /cygdrive for fixpath to work.
57395      new_path="$CYGWIN_ROOT_PATH$input_path"
57396    fi
57397  fi
57398
57399
57400  if test "x$path" != "x$new_path"; then
57401    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57403$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57404  fi
57405
57406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57407
57408  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57409  has_colon=`$ECHO $path | $GREP ^.:`
57410  new_path="$path"
57411  if test "x$has_colon" = x; then
57412    # Not in mixed or Windows style, start by that.
57413    new_path=`cmd //c echo $path`
57414  fi
57415
57416
57417  input_path="$new_path"
57418  # Check if we need to convert this using DOS-style short mode. If the path
57419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57420  # take no chances and rewrite it.
57421  # Note: m4 eats our [], so we need to use [ and ] instead.
57422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57423  if test "x$has_forbidden_chars" != x; then
57424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57426  fi
57427
57428
57429  windows_path="$new_path"
57430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57431    unix_path=`$CYGPATH -u "$windows_path"`
57432    new_path="$unix_path"
57433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57435    new_path="$unix_path"
57436  fi
57437
57438  if test "x$path" != "x$new_path"; then
57439    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57441$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57442  fi
57443
57444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57446
57447    else
57448      # We're on a unix platform. Hooray! :)
57449      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57450      has_space=`$ECHO "$path" | $GREP " "`
57451      if test "x$has_space" != x; then
57452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57453$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57454        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57455      fi
57456
57457      # Use eval to expand a potential ~
57458      eval path="$path"
57459      if test ! -f "$path" && test ! -d "$path"; then
57460        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57461      fi
57462
57463      if test -d "$path"; then
57464        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57465      else
57466        dir="`$DIRNAME "$path"`"
57467        base="`$BASENAME "$path"`"
57468        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57469      fi
57470    fi
57471  fi
57472
57473
57474  # Only process if variable expands to non-empty
57475
57476  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57478
57479  # Input might be given as Windows format, start by converting to
57480  # unix format.
57481  path="$POTENTIAL_FREETYPE_LIB_PATH"
57482  new_path=`$CYGPATH -u "$path"`
57483
57484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57487  # "foo.exe" is OK but "foo" is an error.
57488  #
57489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57490  # It is also a way to make sure we got the proper file name for the real test later on.
57491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57492  if test "x$test_shortpath" = x; then
57493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57494$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57495    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57496  fi
57497
57498  # Call helper function which possibly converts this using DOS-style short mode.
57499  # If so, the updated path is stored in $new_path.
57500
57501  input_path="$new_path"
57502  # Check if we need to convert this using DOS-style short mode. If the path
57503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57504  # take no chances and rewrite it.
57505  # Note: m4 eats our [], so we need to use [ and ] instead.
57506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57507  if test "x$has_forbidden_chars" != x; then
57508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57512      # Going to short mode and back again did indeed matter. Since short mode is
57513      # case insensitive, let's make it lowercase to improve readability.
57514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57515      # Now convert it back to Unix-style (cygpath)
57516      input_path=`$CYGPATH -u "$shortmode_path"`
57517      new_path="$input_path"
57518    fi
57519  fi
57520
57521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57522  if test "x$test_cygdrive_prefix" = x; then
57523    # As a simple fix, exclude /usr/bin since it's not a real path.
57524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57526      # a path prefixed by /cygdrive for fixpath to work.
57527      new_path="$CYGWIN_ROOT_PATH$input_path"
57528    fi
57529  fi
57530
57531
57532  if test "x$path" != "x$new_path"; then
57533    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57535$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57536  fi
57537
57538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57539
57540  path="$POTENTIAL_FREETYPE_LIB_PATH"
57541  has_colon=`$ECHO $path | $GREP ^.:`
57542  new_path="$path"
57543  if test "x$has_colon" = x; then
57544    # Not in mixed or Windows style, start by that.
57545    new_path=`cmd //c echo $path`
57546  fi
57547
57548
57549  input_path="$new_path"
57550  # Check if we need to convert this using DOS-style short mode. If the path
57551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57552  # take no chances and rewrite it.
57553  # Note: m4 eats our [], so we need to use [ and ] instead.
57554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57555  if test "x$has_forbidden_chars" != x; then
57556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57558  fi
57559
57560
57561  windows_path="$new_path"
57562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57563    unix_path=`$CYGPATH -u "$windows_path"`
57564    new_path="$unix_path"
57565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57567    new_path="$unix_path"
57568  fi
57569
57570  if test "x$path" != "x$new_path"; then
57571    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57574  fi
57575
57576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57578
57579    else
57580      # We're on a unix platform. Hooray! :)
57581      path="$POTENTIAL_FREETYPE_LIB_PATH"
57582      has_space=`$ECHO "$path" | $GREP " "`
57583      if test "x$has_space" != x; then
57584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57585$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57587      fi
57588
57589      # Use eval to expand a potential ~
57590      eval path="$path"
57591      if test ! -f "$path" && test ! -d "$path"; then
57592        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57593      fi
57594
57595      if test -d "$path"; then
57596        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57597      else
57598        dir="`$DIRNAME "$path"`"
57599        base="`$BASENAME "$path"`"
57600        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57601      fi
57602    fi
57603  fi
57604
57605
57606    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57608$as_echo_n "checking for freetype includes... " >&6; }
57609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57610$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57611    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57613$as_echo_n "checking for freetype libraries... " >&6; }
57614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57615$as_echo "$FREETYPE_LIB_PATH" >&6; }
57616  fi
57617
57618              fi
57619            fi
57620          fi
57621        fi
57622      fi # end check in well-known locations
57623
57624      if test "x$FOUND_FREETYPE" != xyes; then
57625
57626  # Print a helpful message on how to acquire the necessary build dependency.
57627  # freetype is the help tag: freetype, cups, alsa etc
57628  MISSING_DEPENDENCY=freetype
57629
57630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57631    cygwin_help $MISSING_DEPENDENCY
57632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57633    msys_help $MISSING_DEPENDENCY
57634  else
57635    PKGHANDLER_COMMAND=
57636
57637    case $PKGHANDLER in
57638      apt-get)
57639        apt_help     $MISSING_DEPENDENCY ;;
57640      yum)
57641        yum_help     $MISSING_DEPENDENCY ;;
57642      port)
57643        port_help    $MISSING_DEPENDENCY ;;
57644      pkgutil)
57645        pkgutil_help $MISSING_DEPENDENCY ;;
57646      pkgadd)
57647        pkgadd_help  $MISSING_DEPENDENCY ;;
57648    esac
57649
57650    if test "x$PKGHANDLER_COMMAND" != x; then
57651      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57652    fi
57653  fi
57654
57655        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
57656      fi
57657    fi # end user specified settings
57658
57659    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
57660    if test "x$FREETYPE_CFLAGS" = x; then
57661
57662  # Only process if variable expands to non-empty
57663
57664  if test "x$FREETYPE_INCLUDE_PATH" != x; then
57665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57666
57667  # Input might be given as Windows format, start by converting to
57668  # unix format.
57669  path="$FREETYPE_INCLUDE_PATH"
57670  new_path=`$CYGPATH -u "$path"`
57671
57672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57675  # "foo.exe" is OK but "foo" is an error.
57676  #
57677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57678  # It is also a way to make sure we got the proper file name for the real test later on.
57679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57680  if test "x$test_shortpath" = x; then
57681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57682$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57683    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
57684  fi
57685
57686  # Call helper function which possibly converts this using DOS-style short mode.
57687  # If so, the updated path is stored in $new_path.
57688
57689  input_path="$new_path"
57690  # Check if we need to convert this using DOS-style short mode. If the path
57691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57692  # take no chances and rewrite it.
57693  # Note: m4 eats our [], so we need to use [ and ] instead.
57694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57695  if test "x$has_forbidden_chars" != x; then
57696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57700      # Going to short mode and back again did indeed matter. Since short mode is
57701      # case insensitive, let's make it lowercase to improve readability.
57702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57703      # Now convert it back to Unix-style (cygpath)
57704      input_path=`$CYGPATH -u "$shortmode_path"`
57705      new_path="$input_path"
57706    fi
57707  fi
57708
57709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57710  if test "x$test_cygdrive_prefix" = x; then
57711    # As a simple fix, exclude /usr/bin since it's not a real path.
57712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57714      # a path prefixed by /cygdrive for fixpath to work.
57715      new_path="$CYGWIN_ROOT_PATH$input_path"
57716    fi
57717  fi
57718
57719
57720  if test "x$path" != "x$new_path"; then
57721    FREETYPE_INCLUDE_PATH="$new_path"
57722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57723$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57724  fi
57725
57726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57727
57728  path="$FREETYPE_INCLUDE_PATH"
57729  has_colon=`$ECHO $path | $GREP ^.:`
57730  new_path="$path"
57731  if test "x$has_colon" = x; then
57732    # Not in mixed or Windows style, start by that.
57733    new_path=`cmd //c echo $path`
57734  fi
57735
57736
57737  input_path="$new_path"
57738  # Check if we need to convert this using DOS-style short mode. If the path
57739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57740  # take no chances and rewrite it.
57741  # Note: m4 eats our [], so we need to use [ and ] instead.
57742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57743  if test "x$has_forbidden_chars" != x; then
57744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57746  fi
57747
57748
57749  windows_path="$new_path"
57750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57751    unix_path=`$CYGPATH -u "$windows_path"`
57752    new_path="$unix_path"
57753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57755    new_path="$unix_path"
57756  fi
57757
57758  if test "x$path" != "x$new_path"; then
57759    FREETYPE_INCLUDE_PATH="$new_path"
57760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57761$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57762  fi
57763
57764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57766
57767    else
57768      # We're on a unix platform. Hooray! :)
57769      path="$FREETYPE_INCLUDE_PATH"
57770      has_space=`$ECHO "$path" | $GREP " "`
57771      if test "x$has_space" != x; then
57772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57773$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57774        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57775      fi
57776
57777      # Use eval to expand a potential ~
57778      eval path="$path"
57779      if test ! -f "$path" && test ! -d "$path"; then
57780        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57781      fi
57782
57783      if test -d "$path"; then
57784        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57785      else
57786        dir="`$DIRNAME "$path"`"
57787        base="`$BASENAME "$path"`"
57788        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57789      fi
57790    fi
57791  fi
57792
57793      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
57794        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
57795      else
57796        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
57797      fi
57798    fi
57799
57800    if test "x$FREETYPE_LIBS" = x; then
57801
57802  # Only process if variable expands to non-empty
57803
57804  if test "x$FREETYPE_LIB_PATH" != x; then
57805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57806
57807  # Input might be given as Windows format, start by converting to
57808  # unix format.
57809  path="$FREETYPE_LIB_PATH"
57810  new_path=`$CYGPATH -u "$path"`
57811
57812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57815  # "foo.exe" is OK but "foo" is an error.
57816  #
57817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57818  # It is also a way to make sure we got the proper file name for the real test later on.
57819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57820  if test "x$test_shortpath" = x; then
57821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57822$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57823    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
57824  fi
57825
57826  # Call helper function which possibly converts this using DOS-style short mode.
57827  # If so, the updated path is stored in $new_path.
57828
57829  input_path="$new_path"
57830  # Check if we need to convert this using DOS-style short mode. If the path
57831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57832  # take no chances and rewrite it.
57833  # Note: m4 eats our [], so we need to use [ and ] instead.
57834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57835  if test "x$has_forbidden_chars" != x; then
57836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57840      # Going to short mode and back again did indeed matter. Since short mode is
57841      # case insensitive, let's make it lowercase to improve readability.
57842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57843      # Now convert it back to Unix-style (cygpath)
57844      input_path=`$CYGPATH -u "$shortmode_path"`
57845      new_path="$input_path"
57846    fi
57847  fi
57848
57849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57850  if test "x$test_cygdrive_prefix" = x; then
57851    # As a simple fix, exclude /usr/bin since it's not a real path.
57852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57854      # a path prefixed by /cygdrive for fixpath to work.
57855      new_path="$CYGWIN_ROOT_PATH$input_path"
57856    fi
57857  fi
57858
57859
57860  if test "x$path" != "x$new_path"; then
57861    FREETYPE_LIB_PATH="$new_path"
57862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57863$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57864  fi
57865
57866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57867
57868  path="$FREETYPE_LIB_PATH"
57869  has_colon=`$ECHO $path | $GREP ^.:`
57870  new_path="$path"
57871  if test "x$has_colon" = x; then
57872    # Not in mixed or Windows style, start by that.
57873    new_path=`cmd //c echo $path`
57874  fi
57875
57876
57877  input_path="$new_path"
57878  # Check if we need to convert this using DOS-style short mode. If the path
57879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57880  # take no chances and rewrite it.
57881  # Note: m4 eats our [], so we need to use [ and ] instead.
57882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57883  if test "x$has_forbidden_chars" != x; then
57884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57886  fi
57887
57888
57889  windows_path="$new_path"
57890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57891    unix_path=`$CYGPATH -u "$windows_path"`
57892    new_path="$unix_path"
57893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57895    new_path="$unix_path"
57896  fi
57897
57898  if test "x$path" != "x$new_path"; then
57899    FREETYPE_LIB_PATH="$new_path"
57900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
57901$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57902  fi
57903
57904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57906
57907    else
57908      # We're on a unix platform. Hooray! :)
57909      path="$FREETYPE_LIB_PATH"
57910      has_space=`$ECHO "$path" | $GREP " "`
57911      if test "x$has_space" != x; then
57912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57913$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57915      fi
57916
57917      # Use eval to expand a potential ~
57918      eval path="$path"
57919      if test ! -f "$path" && test ! -d "$path"; then
57920        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57921      fi
57922
57923      if test -d "$path"; then
57924        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57925      else
57926        dir="`$DIRNAME "$path"`"
57927        base="`$BASENAME "$path"`"
57928        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57929      fi
57930    fi
57931  fi
57932
57933      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57934        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
57935      else
57936        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
57937      fi
57938    fi
57939
57940    # Try to compile it
57941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
57942$as_echo_n "checking if we can compile and link with freetype... " >&6; }
57943    ac_ext=cpp
57944ac_cpp='$CXXCPP $CPPFLAGS'
57945ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57946ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57947ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57948
57949    PREV_CXXCFLAGS="$CXXFLAGS"
57950    PREV_LIBS="$LIBS"
57951    PREV_CXX="$CXX"
57952    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
57953    LIBS="$LIBS $FREETYPE_LIBS"
57954    CXX="$FIXPATH $CXX"
57955    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57956/* end confdefs.h.  */
57957
57958          #include<ft2build.h>
57959          #include FT_FREETYPE_H
57960          int main () {
57961            FT_Init_FreeType(NULL);
57962            return 0;
57963          }
57964
57965_ACEOF
57966if ac_fn_cxx_try_link "$LINENO"; then :
57967
57968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57969$as_echo "yes" >&6; }
57970
57971else
57972
57973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57974$as_echo "no" >&6; }
57975          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
57976$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
57977          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
57978$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
57979
57980
57981  # Print a helpful message on how to acquire the necessary build dependency.
57982  # freetype is the help tag: freetype, cups, alsa etc
57983  MISSING_DEPENDENCY=freetype
57984
57985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57986    cygwin_help $MISSING_DEPENDENCY
57987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57988    msys_help $MISSING_DEPENDENCY
57989  else
57990    PKGHANDLER_COMMAND=
57991
57992    case $PKGHANDLER in
57993      apt-get)
57994        apt_help     $MISSING_DEPENDENCY ;;
57995      yum)
57996        yum_help     $MISSING_DEPENDENCY ;;
57997      port)
57998        port_help    $MISSING_DEPENDENCY ;;
57999      pkgutil)
58000        pkgutil_help $MISSING_DEPENDENCY ;;
58001      pkgadd)
58002        pkgadd_help  $MISSING_DEPENDENCY ;;
58003    esac
58004
58005    if test "x$PKGHANDLER_COMMAND" != x; then
58006      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58007    fi
58008  fi
58009
58010
58011          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
58012
58013
58014fi
58015rm -f core conftest.err conftest.$ac_objext \
58016    conftest$ac_exeext conftest.$ac_ext
58017    CXXCFLAGS="$PREV_CXXFLAGS"
58018    LIBS="$PREV_LIBS"
58019    CXX="$PREV_CXX"
58020    ac_ext=cpp
58021ac_cpp='$CXXCPP $CPPFLAGS'
58022ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58023ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58024ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58025
58026
58027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
58028$as_echo_n "checking if we should bundle freetype... " >&6; }
58029    if test "x$BUNDLE_FREETYPE" = xyes; then
58030      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
58031    fi
58032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
58033$as_echo "$BUNDLE_FREETYPE" >&6; }
58034
58035  fi # end freetype needed
58036
58037
58038
58039
58040
58041
58042
58043# Check whether --with-alsa was given.
58044if test "${with_alsa+set}" = set; then :
58045  withval=$with_alsa;
58046fi
58047
58048
58049# Check whether --with-alsa-include was given.
58050if test "${with_alsa_include+set}" = set; then :
58051  withval=$with_alsa_include;
58052fi
58053
58054
58055# Check whether --with-alsa-lib was given.
58056if test "${with_alsa_lib+set}" = set; then :
58057  withval=$with_alsa_lib;
58058fi
58059
58060
58061  if test "x$NEEDS_LIB_ALSA" = xfalse; then
58062    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
58063        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
58064        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
58065      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
58066$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
58067    fi
58068    ALSA_CFLAGS=
58069    ALSA_LIBS=
58070  else
58071    ALSA_FOUND=no
58072
58073    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
58074      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
58075    fi
58076
58077    if test "x${with_alsa}" != x; then
58078      ALSA_LIBS="-L${with_alsa}/lib -lasound"
58079      ALSA_CFLAGS="-I${with_alsa}/include"
58080      ALSA_FOUND=yes
58081    fi
58082    if test "x${with_alsa_include}" != x; then
58083      ALSA_CFLAGS="-I${with_alsa_include}"
58084      ALSA_FOUND=yes
58085    fi
58086    if test "x${with_alsa_lib}" != x; then
58087      ALSA_LIBS="-L${with_alsa_lib} -lasound"
58088      ALSA_FOUND=yes
58089    fi
58090    # Do not try pkg-config if we have a sysroot set.
58091    if test "x$SYSROOT" = x; then
58092      if test "x$ALSA_FOUND" = xno; then
58093
58094pkg_failed=no
58095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
58096$as_echo_n "checking for ALSA... " >&6; }
58097
58098if test -n "$ALSA_CFLAGS"; then
58099    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
58100 elif test -n "$PKG_CONFIG"; then
58101    if test -n "$PKG_CONFIG" && \
58102    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
58103  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
58104  ac_status=$?
58105  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58106  test $ac_status = 0; }; then
58107  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
58108else
58109  pkg_failed=yes
58110fi
58111 else
58112    pkg_failed=untried
58113fi
58114if test -n "$ALSA_LIBS"; then
58115    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
58116 elif test -n "$PKG_CONFIG"; then
58117    if test -n "$PKG_CONFIG" && \
58118    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
58119  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
58120  ac_status=$?
58121  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58122  test $ac_status = 0; }; then
58123  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
58124else
58125  pkg_failed=yes
58126fi
58127 else
58128    pkg_failed=untried
58129fi
58130
58131
58132
58133if test $pkg_failed = yes; then
58134
58135if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58136        _pkg_short_errors_supported=yes
58137else
58138        _pkg_short_errors_supported=no
58139fi
58140        if test $_pkg_short_errors_supported = yes; then
58141	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
58142        else
58143	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
58144        fi
58145	# Put the nasty error message in config.log where it belongs
58146	echo "$ALSA_PKG_ERRORS" >&5
58147
58148	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58149$as_echo "no" >&6; }
58150                ALSA_FOUND=no
58151elif test $pkg_failed = untried; then
58152	ALSA_FOUND=no
58153else
58154	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
58155	ALSA_LIBS=$pkg_cv_ALSA_LIBS
58156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58157$as_echo "yes" >&6; }
58158	ALSA_FOUND=yes
58159fi
58160      fi
58161    fi
58162    if test "x$ALSA_FOUND" = xno; then
58163      for ac_header in alsa/asoundlib.h
58164do :
58165  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
58166if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
58167  cat >>confdefs.h <<_ACEOF
58168#define HAVE_ALSA_ASOUNDLIB_H 1
58169_ACEOF
58170
58171            ALSA_FOUND=yes
58172            ALSA_CFLAGS=-Iignoreme
58173            ALSA_LIBS=-lasound
58174            DEFAULT_ALSA=yes
58175
58176else
58177  ALSA_FOUND=no
58178
58179fi
58180
58181done
58182
58183    fi
58184    if test "x$ALSA_FOUND" = xno; then
58185
58186  # Print a helpful message on how to acquire the necessary build dependency.
58187  # alsa is the help tag: freetype, cups, alsa etc
58188  MISSING_DEPENDENCY=alsa
58189
58190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58191    cygwin_help $MISSING_DEPENDENCY
58192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58193    msys_help $MISSING_DEPENDENCY
58194  else
58195    PKGHANDLER_COMMAND=
58196
58197    case $PKGHANDLER in
58198      apt-get)
58199        apt_help     $MISSING_DEPENDENCY ;;
58200      yum)
58201        yum_help     $MISSING_DEPENDENCY ;;
58202      port)
58203        port_help    $MISSING_DEPENDENCY ;;
58204      pkgutil)
58205        pkgutil_help $MISSING_DEPENDENCY ;;
58206      pkgadd)
58207        pkgadd_help  $MISSING_DEPENDENCY ;;
58208    esac
58209
58210    if test "x$PKGHANDLER_COMMAND" != x; then
58211      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58212    fi
58213  fi
58214
58215      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
58216    fi
58217  fi
58218
58219
58220
58221
58222
58223
58224# Check whether --with-libffi was given.
58225if test "${with_libffi+set}" = set; then :
58226  withval=$with_libffi;
58227fi
58228
58229
58230# Check whether --with-libffi-include was given.
58231if test "${with_libffi_include+set}" = set; then :
58232  withval=$with_libffi_include;
58233fi
58234
58235
58236# Check whether --with-libffi-lib was given.
58237if test "${with_libffi_lib+set}" = set; then :
58238  withval=$with_libffi_lib;
58239fi
58240
58241
58242  if test "x$NEEDS_LIB_FFI" = xfalse; then
58243    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
58244        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
58245        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
58246      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
58247$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
58248    fi
58249    LIBFFI_CFLAGS=
58250    LIBFFI_LIBS=
58251  else
58252    LIBFFI_FOUND=no
58253
58254    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
58255      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
58256    fi
58257
58258    if test "x${with_libffi}" != x; then
58259      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
58260      LIBFFI_CFLAGS="-I${with_libffi}/include"
58261      LIBFFI_FOUND=yes
58262    fi
58263    if test "x${with_libffi_include}" != x; then
58264      LIBFFI_CFLAGS="-I${with_libffi_include}"
58265      LIBFFI_FOUND=yes
58266    fi
58267    if test "x${with_libffi_lib}" != x; then
58268      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
58269      LIBFFI_FOUND=yes
58270    fi
58271    # Do not try pkg-config if we have a sysroot set.
58272    if test "x$SYSROOT" = x; then
58273      if test "x$LIBFFI_FOUND" = xno; then
58274        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
58275
58276pkg_failed=no
58277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
58278$as_echo_n "checking for LIBFFI... " >&6; }
58279
58280if test -n "$LIBFFI_CFLAGS"; then
58281    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
58282 elif test -n "$PKG_CONFIG"; then
58283    if test -n "$PKG_CONFIG" && \
58284    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
58285  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
58286  ac_status=$?
58287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58288  test $ac_status = 0; }; then
58289  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
58290else
58291  pkg_failed=yes
58292fi
58293 else
58294    pkg_failed=untried
58295fi
58296if test -n "$LIBFFI_LIBS"; then
58297    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
58298 elif test -n "$PKG_CONFIG"; then
58299    if test -n "$PKG_CONFIG" && \
58300    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
58301  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
58302  ac_status=$?
58303  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58304  test $ac_status = 0; }; then
58305  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
58306else
58307  pkg_failed=yes
58308fi
58309 else
58310    pkg_failed=untried
58311fi
58312
58313
58314
58315if test $pkg_failed = yes; then
58316
58317if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58318        _pkg_short_errors_supported=yes
58319else
58320        _pkg_short_errors_supported=no
58321fi
58322        if test $_pkg_short_errors_supported = yes; then
58323	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
58324        else
58325	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
58326        fi
58327	# Put the nasty error message in config.log where it belongs
58328	echo "$LIBFFI_PKG_ERRORS" >&5
58329
58330	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58331$as_echo "no" >&6; }
58332                LIBFFI_FOUND=no
58333elif test $pkg_failed = untried; then
58334	LIBFFI_FOUND=no
58335else
58336	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
58337	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
58338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58339$as_echo "yes" >&6; }
58340	LIBFFI_FOUND=yes
58341fi
58342      fi
58343    fi
58344    if test "x$LIBFFI_FOUND" = xno; then
58345      for ac_header in ffi.h
58346do :
58347  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
58348if test "x$ac_cv_header_ffi_h" = xyes; then :
58349  cat >>confdefs.h <<_ACEOF
58350#define HAVE_FFI_H 1
58351_ACEOF
58352
58353            LIBFFI_FOUND=yes
58354            LIBFFI_CFLAGS=
58355            LIBFFI_LIBS=-lffi
58356
58357else
58358  LIBFFI_FOUND=no
58359
58360fi
58361
58362done
58363
58364    fi
58365    if test "x$LIBFFI_FOUND" = xno; then
58366
58367  # Print a helpful message on how to acquire the necessary build dependency.
58368  # ffi is the help tag: freetype, cups, alsa etc
58369  MISSING_DEPENDENCY=ffi
58370
58371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58372    cygwin_help $MISSING_DEPENDENCY
58373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58374    msys_help $MISSING_DEPENDENCY
58375  else
58376    PKGHANDLER_COMMAND=
58377
58378    case $PKGHANDLER in
58379      apt-get)
58380        apt_help     $MISSING_DEPENDENCY ;;
58381      yum)
58382        yum_help     $MISSING_DEPENDENCY ;;
58383      port)
58384        port_help    $MISSING_DEPENDENCY ;;
58385      pkgutil)
58386        pkgutil_help $MISSING_DEPENDENCY ;;
58387      pkgadd)
58388        pkgadd_help  $MISSING_DEPENDENCY ;;
58389    esac
58390
58391    if test "x$PKGHANDLER_COMMAND" != x; then
58392      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58393    fi
58394  fi
58395
58396      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
58397    fi
58398
58399    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
58400$as_echo_n "checking if libffi works... " >&6; }
58401    ac_ext=c
58402ac_cpp='$CPP $CPPFLAGS'
58403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58405ac_compiler_gnu=$ac_cv_c_compiler_gnu
58406
58407    OLD_CFLAGS="$CFLAGS"
58408    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
58409    OLD_LIBS="$LIBS"
58410    LIBS="$LIBS $LIBFFI_LIBS"
58411    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58412/* end confdefs.h.  */
58413#include <ffi.h>
58414int
58415main ()
58416{
58417
58418          ffi_call(NULL, NULL, NULL, NULL);
58419          return 0;
58420
58421  ;
58422  return 0;
58423}
58424_ACEOF
58425if ac_fn_c_try_link "$LINENO"; then :
58426  LIBFFI_WORKS=yes
58427else
58428  LIBFFI_WORKS=no
58429
58430fi
58431rm -f core conftest.err conftest.$ac_objext \
58432    conftest$ac_exeext conftest.$ac_ext
58433    CFLAGS="$OLD_CFLAGS"
58434    LIBS="$OLD_LIBS"
58435    ac_ext=cpp
58436ac_cpp='$CXXCPP $CPPFLAGS'
58437ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58438ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58439ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
58440
58441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
58442$as_echo "$LIBFFI_WORKS" >&6; }
58443
58444    if test "x$LIBFFI_WORKS" = xno; then
58445
58446  # Print a helpful message on how to acquire the necessary build dependency.
58447  # ffi is the help tag: freetype, cups, alsa etc
58448  MISSING_DEPENDENCY=ffi
58449
58450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58451    cygwin_help $MISSING_DEPENDENCY
58452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58453    msys_help $MISSING_DEPENDENCY
58454  else
58455    PKGHANDLER_COMMAND=
58456
58457    case $PKGHANDLER in
58458      apt-get)
58459        apt_help     $MISSING_DEPENDENCY ;;
58460      yum)
58461        yum_help     $MISSING_DEPENDENCY ;;
58462      port)
58463        port_help    $MISSING_DEPENDENCY ;;
58464      pkgutil)
58465        pkgutil_help $MISSING_DEPENDENCY ;;
58466      pkgadd)
58467        pkgadd_help  $MISSING_DEPENDENCY ;;
58468    esac
58469
58470    if test "x$PKGHANDLER_COMMAND" != x; then
58471      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58472    fi
58473  fi
58474
58475      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
58476    fi
58477  fi
58478
58479
58480
58481
58482
58483  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
58484    # Extract the first word of "llvm-config", so it can be a program name with args.
58485set dummy llvm-config; ac_word=$2
58486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58487$as_echo_n "checking for $ac_word... " >&6; }
58488if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
58489  $as_echo_n "(cached) " >&6
58490else
58491  if test -n "$LLVM_CONFIG"; then
58492  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
58493else
58494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58495for as_dir in $PATH
58496do
58497  IFS=$as_save_IFS
58498  test -z "$as_dir" && as_dir=.
58499    for ac_exec_ext in '' $ac_executable_extensions; do
58500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58501    ac_cv_prog_LLVM_CONFIG="llvm-config"
58502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58503    break 2
58504  fi
58505done
58506  done
58507IFS=$as_save_IFS
58508
58509fi
58510fi
58511LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
58512if test -n "$LLVM_CONFIG"; then
58513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
58514$as_echo "$LLVM_CONFIG" >&6; }
58515else
58516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58517$as_echo "no" >&6; }
58518fi
58519
58520
58521
58522    if test "x$LLVM_CONFIG" != xllvm-config; then
58523      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
58524    fi
58525
58526    llvm_components="jit mcjit engine nativecodegen native"
58527    unset LLVM_CFLAGS
58528    for flag in $("$LLVM_CONFIG" --cxxflags); do
58529      if echo "${flag}" | grep -q '^-[ID]'; then
58530        if test "${flag}" != "-D_DEBUG" ; then
58531          if test "${LLVM_CFLAGS}" != "" ; then
58532            LLVM_CFLAGS="${LLVM_CFLAGS} "
58533          fi
58534          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
58535        fi
58536      fi
58537    done
58538    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
58539    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
58540
58541    unset LLVM_LDFLAGS
58542    for flag in $("${LLVM_CONFIG}" --ldflags); do
58543      if echo "${flag}" | grep -q '^-L'; then
58544        if test "${LLVM_LDFLAGS}" != ""; then
58545          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
58546        fi
58547        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
58548      fi
58549    done
58550
58551    unset LLVM_LIBS
58552    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
58553      if echo "${flag}" | grep -q '^-l'; then
58554        if test "${LLVM_LIBS}" != ""; then
58555          LLVM_LIBS="${LLVM_LIBS} "
58556        fi
58557        LLVM_LIBS="${LLVM_LIBS}${flag}"
58558      fi
58559    done
58560
58561
58562
58563
58564  fi
58565
58566
58567
58568# Check whether --with-libjpeg was given.
58569if test "${with_libjpeg+set}" = set; then :
58570  withval=$with_libjpeg;
58571fi
58572
58573
58574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
58575$as_echo_n "checking for which libjpeg to use... " >&6; }
58576  # default is bundled
58577  DEFAULT_LIBJPEG=bundled
58578  # if user didn't specify, use DEFAULT_LIBJPEG
58579  if test "x${with_libjpeg}" = "x"; then
58580    with_libjpeg=${DEFAULT_LIBJPEG}
58581  fi
58582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
58583$as_echo "${with_libjpeg}" >&6; }
58584
58585  if test "x${with_libjpeg}" = "xbundled"; then
58586    USE_EXTERNAL_LIBJPEG=false
58587  elif test "x${with_libjpeg}" = "xsystem"; then
58588    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
58589if test "x$ac_cv_header_jpeglib_h" = xyes; then :
58590
58591else
58592   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
58593fi
58594
58595
58596    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
58597$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
58598if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
58599  $as_echo_n "(cached) " >&6
58600else
58601  ac_check_lib_save_LIBS=$LIBS
58602LIBS="-ljpeg  $LIBS"
58603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58604/* end confdefs.h.  */
58605
58606/* Override any GCC internal prototype to avoid an error.
58607   Use char because int might match the return type of a GCC
58608   builtin and then its argument prototype would still apply.  */
58609#ifdef __cplusplus
58610extern "C"
58611#endif
58612char jpeg_CreateDecompress ();
58613int
58614main ()
58615{
58616return jpeg_CreateDecompress ();
58617  ;
58618  return 0;
58619}
58620_ACEOF
58621if ac_fn_cxx_try_link "$LINENO"; then :
58622  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
58623else
58624  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
58625fi
58626rm -f core conftest.err conftest.$ac_objext \
58627    conftest$ac_exeext conftest.$ac_ext
58628LIBS=$ac_check_lib_save_LIBS
58629fi
58630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
58631$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
58632if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
58633  cat >>confdefs.h <<_ACEOF
58634#define HAVE_LIBJPEG 1
58635_ACEOF
58636
58637  LIBS="-ljpeg $LIBS"
58638
58639else
58640   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
58641fi
58642
58643
58644    USE_EXTERNAL_LIBJPEG=true
58645  else
58646    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
58647  fi
58648
58649
58650
58651
58652
58653# Check whether --with-giflib was given.
58654if test "${with_giflib+set}" = set; then :
58655  withval=$with_giflib;
58656fi
58657
58658
58659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
58660$as_echo_n "checking for which giflib to use... " >&6; }
58661  # default is bundled
58662  DEFAULT_GIFLIB=bundled
58663  # if user didn't specify, use DEFAULT_GIFLIB
58664  if test "x${with_giflib}" = "x"; then
58665    with_giflib=${DEFAULT_GIFLIB}
58666  fi
58667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
58668$as_echo "${with_giflib}" >&6; }
58669
58670  if test "x${with_giflib}" = "xbundled"; then
58671    USE_EXTERNAL_LIBGIF=false
58672  elif test "x${with_giflib}" = "xsystem"; then
58673    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
58674if test "x$ac_cv_header_gif_lib_h" = xyes; then :
58675
58676else
58677   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
58678fi
58679
58680
58681    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
58682$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
58683if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
58684  $as_echo_n "(cached) " >&6
58685else
58686  ac_check_lib_save_LIBS=$LIBS
58687LIBS="-lgif  $LIBS"
58688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58689/* end confdefs.h.  */
58690
58691/* Override any GCC internal prototype to avoid an error.
58692   Use char because int might match the return type of a GCC
58693   builtin and then its argument prototype would still apply.  */
58694#ifdef __cplusplus
58695extern "C"
58696#endif
58697char DGifGetCode ();
58698int
58699main ()
58700{
58701return DGifGetCode ();
58702  ;
58703  return 0;
58704}
58705_ACEOF
58706if ac_fn_cxx_try_link "$LINENO"; then :
58707  ac_cv_lib_gif_DGifGetCode=yes
58708else
58709  ac_cv_lib_gif_DGifGetCode=no
58710fi
58711rm -f core conftest.err conftest.$ac_objext \
58712    conftest$ac_exeext conftest.$ac_ext
58713LIBS=$ac_check_lib_save_LIBS
58714fi
58715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
58716$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
58717if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
58718  cat >>confdefs.h <<_ACEOF
58719#define HAVE_LIBGIF 1
58720_ACEOF
58721
58722  LIBS="-lgif $LIBS"
58723
58724else
58725   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
58726fi
58727
58728
58729    USE_EXTERNAL_LIBGIF=true
58730  else
58731    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
58732  fi
58733
58734
58735
58736
58737
58738# Check whether --with-libpng was given.
58739if test "${with_libpng+set}" = set; then :
58740  withval=$with_libpng;
58741fi
58742
58743
58744  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
58745$as_echo_n "checking for which libpng to use... " >&6; }
58746
58747  # default is bundled
58748  DEFAULT_LIBPNG=bundled
58749  # if user didn't specify, use DEFAULT_LIBPNG
58750  if test "x${with_libpng}" = "x"; then
58751      with_libpng=${DEFAULT_LIBPNG}
58752  fi
58753
58754  if test "x${with_libpng}" = "xbundled"; then
58755      USE_EXTERNAL_LIBPNG=false
58756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58757$as_echo "bundled" >&6; }
58758  elif test "x${with_libpng}" = "xsystem"; then
58759
58760pkg_failed=no
58761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
58762$as_echo_n "checking for PNG... " >&6; }
58763
58764if test -n "$PNG_CFLAGS"; then
58765    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
58766 elif test -n "$PKG_CONFIG"; then
58767    if test -n "$PKG_CONFIG" && \
58768    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58769  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58770  ac_status=$?
58771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58772  test $ac_status = 0; }; then
58773  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
58774else
58775  pkg_failed=yes
58776fi
58777 else
58778    pkg_failed=untried
58779fi
58780if test -n "$PNG_LIBS"; then
58781    pkg_cv_PNG_LIBS="$PNG_LIBS"
58782 elif test -n "$PKG_CONFIG"; then
58783    if test -n "$PKG_CONFIG" && \
58784    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
58785  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
58786  ac_status=$?
58787  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58788  test $ac_status = 0; }; then
58789  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
58790else
58791  pkg_failed=yes
58792fi
58793 else
58794    pkg_failed=untried
58795fi
58796
58797
58798
58799if test $pkg_failed = yes; then
58800
58801if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58802        _pkg_short_errors_supported=yes
58803else
58804        _pkg_short_errors_supported=no
58805fi
58806        if test $_pkg_short_errors_supported = yes; then
58807	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
58808        else
58809	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
58810        fi
58811	# Put the nasty error message in config.log where it belongs
58812	echo "$PNG_PKG_ERRORS" >&5
58813
58814	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58815$as_echo "no" >&6; }
58816                 LIBPNG_FOUND=no
58817elif test $pkg_failed = untried; then
58818	 LIBPNG_FOUND=no
58819else
58820	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
58821	PNG_LIBS=$pkg_cv_PNG_LIBS
58822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58823$as_echo "yes" >&6; }
58824	 LIBPNG_FOUND=yes
58825fi
58826      if test "x${LIBPNG_FOUND}" = "xyes"; then
58827          USE_EXTERNAL_LIBPNG=true
58828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58829$as_echo "system" >&6; }
58830      else
58831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58832$as_echo "system not found" >&6; }
58833          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
58834      fi
58835  else
58836      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
58837  fi
58838
58839
58840
58841
58842
58843# Check whether --with-zlib was given.
58844if test "${with_zlib+set}" = set; then :
58845  withval=$with_zlib;
58846fi
58847
58848
58849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
58850$as_echo_n "checking for compress in -lz... " >&6; }
58851if ${ac_cv_lib_z_compress+:} false; then :
58852  $as_echo_n "(cached) " >&6
58853else
58854  ac_check_lib_save_LIBS=$LIBS
58855LIBS="-lz  $LIBS"
58856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58857/* end confdefs.h.  */
58858
58859/* Override any GCC internal prototype to avoid an error.
58860   Use char because int might match the return type of a GCC
58861   builtin and then its argument prototype would still apply.  */
58862#ifdef __cplusplus
58863extern "C"
58864#endif
58865char compress ();
58866int
58867main ()
58868{
58869return compress ();
58870  ;
58871  return 0;
58872}
58873_ACEOF
58874if ac_fn_cxx_try_link "$LINENO"; then :
58875  ac_cv_lib_z_compress=yes
58876else
58877  ac_cv_lib_z_compress=no
58878fi
58879rm -f core conftest.err conftest.$ac_objext \
58880    conftest$ac_exeext conftest.$ac_ext
58881LIBS=$ac_check_lib_save_LIBS
58882fi
58883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
58884$as_echo "$ac_cv_lib_z_compress" >&6; }
58885if test "x$ac_cv_lib_z_compress" = xyes; then :
58886   ZLIB_FOUND=yes
58887else
58888   ZLIB_FOUND=no
58889fi
58890
58891
58892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
58893$as_echo_n "checking for which zlib to use... " >&6; }
58894
58895  DEFAULT_ZLIB=bundled
58896  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
58897    # On macosx default is system...on others default is bundled
58898    DEFAULT_ZLIB=system
58899  fi
58900
58901  if test "x${ZLIB_FOUND}" != "xyes"; then
58902    # If we don't find any system...set default to bundled
58903    DEFAULT_ZLIB=bundled
58904  fi
58905
58906  # If user didn't specify, use DEFAULT_ZLIB
58907  if test "x${with_zlib}" = "x"; then
58908    with_zlib=${DEFAULT_ZLIB}
58909  fi
58910
58911  if test "x${with_zlib}" = "xbundled"; then
58912    USE_EXTERNAL_LIBZ=false
58913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58914$as_echo "bundled" >&6; }
58915  elif test "x${with_zlib}" = "xsystem"; then
58916    if test "x${ZLIB_FOUND}" = "xyes"; then
58917      USE_EXTERNAL_LIBZ=true
58918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58919$as_echo "system" >&6; }
58920    else
58921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
58922$as_echo "system not found" >&6; }
58923      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
58924    fi
58925  else
58926    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
58927  fi
58928
58929
58930
58931
58932
58933# Check whether --with-lcms was given.
58934if test "${with_lcms+set}" = set; then :
58935  withval=$with_lcms;
58936fi
58937
58938
58939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
58940$as_echo_n "checking for which lcms to use... " >&6; }
58941
58942  DEFAULT_LCMS=bundled
58943  # If user didn't specify, use DEFAULT_LCMS
58944  if test "x${with_lcms}" = "x"; then
58945      with_lcms=${DEFAULT_LCMS}
58946  fi
58947
58948  if test "x${with_lcms}" = "xbundled"; then
58949    USE_EXTERNAL_LCMS=false
58950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
58951$as_echo "bundled" >&6; }
58952  elif test "x${with_lcms}" = "xsystem"; then
58953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
58954$as_echo "system" >&6; }
58955
58956pkg_failed=no
58957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
58958$as_echo_n "checking for LCMS... " >&6; }
58959
58960if test -n "$LCMS_CFLAGS"; then
58961    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
58962 elif test -n "$PKG_CONFIG"; then
58963    if test -n "$PKG_CONFIG" && \
58964    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58965  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58966  ac_status=$?
58967  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58968  test $ac_status = 0; }; then
58969  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
58970else
58971  pkg_failed=yes
58972fi
58973 else
58974    pkg_failed=untried
58975fi
58976if test -n "$LCMS_LIBS"; then
58977    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
58978 elif test -n "$PKG_CONFIG"; then
58979    if test -n "$PKG_CONFIG" && \
58980    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
58981  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
58982  ac_status=$?
58983  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58984  test $ac_status = 0; }; then
58985  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
58986else
58987  pkg_failed=yes
58988fi
58989 else
58990    pkg_failed=untried
58991fi
58992
58993
58994
58995if test $pkg_failed = yes; then
58996
58997if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58998        _pkg_short_errors_supported=yes
58999else
59000        _pkg_short_errors_supported=no
59001fi
59002        if test $_pkg_short_errors_supported = yes; then
59003	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
59004        else
59005	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
59006        fi
59007	# Put the nasty error message in config.log where it belongs
59008	echo "$LCMS_PKG_ERRORS" >&5
59009
59010	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59011$as_echo "no" >&6; }
59012                LCMS_FOUND=no
59013elif test $pkg_failed = untried; then
59014	LCMS_FOUND=no
59015else
59016	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
59017	LCMS_LIBS=$pkg_cv_LCMS_LIBS
59018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59019$as_echo "yes" >&6; }
59020	LCMS_FOUND=yes
59021fi
59022    if test "x${LCMS_FOUND}" = "xyes"; then
59023      USE_EXTERNAL_LCMS=true
59024    else
59025      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
59026    fi
59027  else
59028    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
59029  fi
59030
59031
59032
59033
59034
59035
59036
59037
59038
59039
59040
59041  # Setup libm (the maths library)
59042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
59043$as_echo_n "checking for cos in -lm... " >&6; }
59044if ${ac_cv_lib_m_cos+:} false; then :
59045  $as_echo_n "(cached) " >&6
59046else
59047  ac_check_lib_save_LIBS=$LIBS
59048LIBS="-lm  $LIBS"
59049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59050/* end confdefs.h.  */
59051
59052/* Override any GCC internal prototype to avoid an error.
59053   Use char because int might match the return type of a GCC
59054   builtin and then its argument prototype would still apply.  */
59055#ifdef __cplusplus
59056extern "C"
59057#endif
59058char cos ();
59059int
59060main ()
59061{
59062return cos ();
59063  ;
59064  return 0;
59065}
59066_ACEOF
59067if ac_fn_cxx_try_link "$LINENO"; then :
59068  ac_cv_lib_m_cos=yes
59069else
59070  ac_cv_lib_m_cos=no
59071fi
59072rm -f core conftest.err conftest.$ac_objext \
59073    conftest$ac_exeext conftest.$ac_ext
59074LIBS=$ac_check_lib_save_LIBS
59075fi
59076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
59077$as_echo "$ac_cv_lib_m_cos" >&6; }
59078if test "x$ac_cv_lib_m_cos" = xyes; then :
59079  cat >>confdefs.h <<_ACEOF
59080#define HAVE_LIBM 1
59081_ACEOF
59082
59083  LIBS="-lm $LIBS"
59084
59085else
59086
59087      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
59088$as_echo "$as_me: Maths library was not found" >&6;}
59089
59090fi
59091
59092  LIBM=-lm
59093
59094
59095  # Setup libdl (for dynamic library loading)
59096  save_LIBS="$LIBS"
59097  LIBS=""
59098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
59099$as_echo_n "checking for dlopen in -ldl... " >&6; }
59100if ${ac_cv_lib_dl_dlopen+:} false; then :
59101  $as_echo_n "(cached) " >&6
59102else
59103  ac_check_lib_save_LIBS=$LIBS
59104LIBS="-ldl  $LIBS"
59105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59106/* end confdefs.h.  */
59107
59108/* Override any GCC internal prototype to avoid an error.
59109   Use char because int might match the return type of a GCC
59110   builtin and then its argument prototype would still apply.  */
59111#ifdef __cplusplus
59112extern "C"
59113#endif
59114char dlopen ();
59115int
59116main ()
59117{
59118return dlopen ();
59119  ;
59120  return 0;
59121}
59122_ACEOF
59123if ac_fn_cxx_try_link "$LINENO"; then :
59124  ac_cv_lib_dl_dlopen=yes
59125else
59126  ac_cv_lib_dl_dlopen=no
59127fi
59128rm -f core conftest.err conftest.$ac_objext \
59129    conftest$ac_exeext conftest.$ac_ext
59130LIBS=$ac_check_lib_save_LIBS
59131fi
59132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
59133$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
59134if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
59135  cat >>confdefs.h <<_ACEOF
59136#define HAVE_LIBDL 1
59137_ACEOF
59138
59139  LIBS="-ldl $LIBS"
59140
59141fi
59142
59143  LIBDL="$LIBS"
59144
59145  LIBS="$save_LIBS"
59146
59147  # Deprecated libraries, keep the flags for backwards compatibility
59148  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
59149
59150
59151# Check whether --with-dxsdk was given.
59152if test "${with_dxsdk+set}" = set; then :
59153  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
59154$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
59155fi
59156
59157
59158
59159
59160# Check whether --with-dxsdk-lib was given.
59161if test "${with_dxsdk_lib+set}" = set; then :
59162  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
59163$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
59164fi
59165
59166
59167
59168
59169# Check whether --with-dxsdk-include was given.
59170if test "${with_dxsdk_include+set}" = set; then :
59171  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
59172$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
59173fi
59174
59175
59176  fi
59177
59178  # Control if libzip can use mmap. Available for purposes of overriding.
59179  LIBZIP_CAN_USE_MMAP=true
59180
59181
59182
59183
59184
59185
59186
59187
59188
59189
59190
59191
59192
59193
59194###############################################################################
59195#
59196# We need to do some final tweaking, when everything else is done.
59197#
59198###############################################################################
59199
59200
59201  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
59202
59203
59204
59205  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
59206$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
59207
59208  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
59209    ENABLE_INTREE_EC=yes
59210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59211$as_echo "yes" >&6; }
59212  else
59213    ENABLE_INTREE_EC=no
59214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59215$as_echo "no" >&6; }
59216  fi
59217
59218
59219
59220
59221###############################################################################
59222#
59223# Configure parts of the build that only affect the build performance,
59224# not the result.
59225#
59226###############################################################################
59227
59228
59229  # How many cores do we have on this build system?
59230
59231# Check whether --with-num-cores was given.
59232if test "${with_num_cores+set}" = set; then :
59233  withval=$with_num_cores;
59234fi
59235
59236  if test "x$with_num_cores" = x; then
59237    # The number of cores were not specified, try to probe them.
59238
59239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
59240$as_echo_n "checking for number of cores... " >&6; }
59241  NUM_CORES=1
59242  FOUND_CORES=no
59243
59244  if test -f /proc/cpuinfo; then
59245    # Looks like a Linux (or cygwin) system
59246    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
59247    FOUND_CORES=yes
59248  elif test -x /usr/sbin/psrinfo; then
59249    # Looks like a Solaris system
59250    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
59251    FOUND_CORES=yes
59252  elif test -x /usr/sbin/system_profiler; then
59253    # Looks like a MacOSX system
59254    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
59255    FOUND_CORES=yes
59256  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
59257    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
59258    FOUND_CORES=yes
59259  elif test -n "$NUMBER_OF_PROCESSORS"; then
59260    # On windows, look in the env
59261    NUM_CORES=$NUMBER_OF_PROCESSORS
59262    FOUND_CORES=yes
59263  fi
59264
59265  if test "x$FOUND_CORES" = xyes; then
59266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
59267$as_echo "$NUM_CORES" >&6; }
59268  else
59269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
59270$as_echo "could not detect number of cores, defaulting to 1" >&6; }
59271    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
59272$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
59273  fi
59274
59275  else
59276    NUM_CORES=$with_num_cores
59277  fi
59278
59279
59280
59281  # How much memory do we have on this build system?
59282
59283# Check whether --with-memory-size was given.
59284if test "${with_memory_size+set}" = set; then :
59285  withval=$with_memory_size;
59286fi
59287
59288  if test "x$with_memory_size" = x; then
59289    # The memory size was not specified, try to probe it.
59290
59291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
59292$as_echo_n "checking for memory size... " >&6; }
59293  # Default to 1024 MB
59294  MEMORY_SIZE=1024
59295  FOUND_MEM=no
59296
59297  if test -f /proc/meminfo; then
59298    # Looks like a Linux (or cygwin) system
59299    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
59300    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
59301    FOUND_MEM=yes
59302  elif test -x /usr/sbin/prtconf; then
59303    # Looks like a Solaris or AIX system
59304    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
59305    FOUND_MEM=yes
59306  elif test -x /usr/sbin/system_profiler; then
59307    # Looks like a MacOSX system
59308    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
59309    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
59310    FOUND_MEM=yes
59311  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
59312    # Windows, but without cygwin
59313    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
59314    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
59315    FOUND_MEM=yes
59316  fi
59317
59318  if test "x$FOUND_MEM" = xyes; then
59319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
59320$as_echo "$MEMORY_SIZE MB" >&6; }
59321  else
59322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
59323$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
59324    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
59325$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
59326  fi
59327
59328  else
59329    MEMORY_SIZE=$with_memory_size
59330  fi
59331
59332
59333
59334  # Provide a decent default number of parallel jobs for make depending on
59335  # number of cores, amount of memory and machine architecture.
59336
59337# Check whether --with-jobs was given.
59338if test "${with_jobs+set}" = set; then :
59339  withval=$with_jobs;
59340fi
59341
59342  if test "x$with_jobs" = x; then
59343    # Number of jobs was not specified, calculate.
59344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
59345$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
59346    # Approximate memory in GB.
59347    memory_gb=`expr $MEMORY_SIZE / 1024`
59348    # Pick the lowest of memory in gb and number of cores.
59349    if test "$memory_gb" -lt "$NUM_CORES"; then
59350      JOBS="$memory_gb"
59351    else
59352      JOBS="$NUM_CORES"
59353    fi
59354    if test "$JOBS" -eq "0"; then
59355      JOBS=1
59356    fi
59357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
59358$as_echo "$JOBS" >&6; }
59359  else
59360    JOBS=$with_jobs
59361  fi
59362
59363
59364
59365  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
59366
59367# Check whether --with-test-jobs was given.
59368if test "${with_test_jobs+set}" = set; then :
59369  withval=$with_test_jobs;
59370fi
59371
59372  if test "x$with_test_jobs" = x; then
59373      TEST_JOBS=0
59374  else
59375      TEST_JOBS=$with_test_jobs
59376  fi
59377
59378
59379
59380# Setup arguments for the boot jdk (after cores and memory have been setup)
59381
59382  ##############################################################################
59383  #
59384  # Specify jvm options for anything that is run with the Boot JDK.
59385  # Not all JVM:s accept the same arguments on the command line.
59386  #
59387
59388# Check whether --with-boot-jdk-jvmargs was given.
59389if test "${with_boot_jdk_jvmargs+set}" = set; then :
59390  withval=$with_boot_jdk_jvmargs;
59391fi
59392
59393
59394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
59395$as_echo_n "checking flags for boot jdk java command ... " >&6; }
59396
59397  # Disable special log output when a debug build is used as Boot JDK...
59398
59399  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
59400  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
59401  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
59402  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59403  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59404  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59405    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
59406    JVM_ARG_OK=true
59407  else
59408    $ECHO "Arg failed:" >&5
59409    $ECHO "$OUTPUT" >&5
59410    JVM_ARG_OK=false
59411  fi
59412
59413
59414  # Apply user provided options.
59415
59416  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
59417  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
59418  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
59419  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59420  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59421  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59422    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
59423    JVM_ARG_OK=true
59424  else
59425    $ECHO "Arg failed:" >&5
59426    $ECHO "$OUTPUT" >&5
59427    JVM_ARG_OK=false
59428  fi
59429
59430
59431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
59432$as_echo "$boot_jdk_jvmargs" >&6; }
59433
59434  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
59435  JAVA_FLAGS=$boot_jdk_jvmargs
59436
59437
59438
59439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
59440$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
59441
59442  # Starting amount of heap memory.
59443
59444  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
59445  $ECHO "Command: $JAVA -Xms64M -version" >&5
59446  OUTPUT=`$JAVA -Xms64M -version 2>&1`
59447  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59448  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59449  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59450    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
59451    JVM_ARG_OK=true
59452  else
59453    $ECHO "Arg failed:" >&5
59454    $ECHO "$OUTPUT" >&5
59455    JVM_ARG_OK=false
59456  fi
59457
59458
59459  # Maximum amount of heap memory.
59460  # Maximum stack size.
59461  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
59462  if test "x$BOOT_JDK_BITS" = "x32"; then
59463    if test "$JVM_MAX_HEAP" -gt "1100"; then
59464      JVM_MAX_HEAP=1100
59465    elif test "$JVM_MAX_HEAP" -lt "512"; then
59466      JVM_MAX_HEAP=512
59467    fi
59468    STACK_SIZE=768
59469  else
59470    # Running a 64 bit JVM allows for and requires a bigger heap
59471    if test "$JVM_MAX_HEAP" -gt "1600"; then
59472      JVM_MAX_HEAP=1600
59473    elif test "$JVM_MAX_HEAP" -lt "512"; then
59474      JVM_MAX_HEAP=512
59475    fi
59476    STACK_SIZE=1536
59477  fi
59478
59479  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
59480  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
59481  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
59482  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59483  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59484  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59485    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
59486    JVM_ARG_OK=true
59487  else
59488    $ECHO "Arg failed:" >&5
59489    $ECHO "$OUTPUT" >&5
59490    JVM_ARG_OK=false
59491  fi
59492
59493
59494  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
59495  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
59496  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
59497  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59498  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59499  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59500    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
59501    JVM_ARG_OK=true
59502  else
59503    $ECHO "Arg failed:" >&5
59504    $ECHO "$OUTPUT" >&5
59505    JVM_ARG_OK=false
59506  fi
59507
59508
59509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
59510$as_echo "$boot_jdk_jvmargs_big" >&6; }
59511
59512  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
59513
59514
59515  # By default, the main javac compilations use big
59516  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
59517
59518
59519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
59520$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
59521
59522  # Use serial gc for small short lived tools if possible
59523
59524  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
59525  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
59526  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
59527  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59528  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59529  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59530    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
59531    JVM_ARG_OK=true
59532  else
59533    $ECHO "Arg failed:" >&5
59534    $ECHO "$OUTPUT" >&5
59535    JVM_ARG_OK=false
59536  fi
59537
59538
59539  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
59540  $ECHO "Command: $JAVA -Xms32M -version" >&5
59541  OUTPUT=`$JAVA -Xms32M -version 2>&1`
59542  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59543  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59544  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59545    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
59546    JVM_ARG_OK=true
59547  else
59548    $ECHO "Arg failed:" >&5
59549    $ECHO "$OUTPUT" >&5
59550    JVM_ARG_OK=false
59551  fi
59552
59553
59554  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
59555  $ECHO "Command: $JAVA -Xmx512M -version" >&5
59556  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
59557  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59558  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59559  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59560    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
59561    JVM_ARG_OK=true
59562  else
59563    $ECHO "Arg failed:" >&5
59564    $ECHO "$OUTPUT" >&5
59565    JVM_ARG_OK=false
59566  fi
59567
59568
59569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
59570$as_echo "$boot_jdk_jvmargs_small" >&6; }
59571
59572  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
59573
59574
59575  JAVA_TOOL_FLAGS_SMALL=""
59576  for f in $JAVA_FLAGS_SMALL; do
59577    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
59578  done
59579
59580
59581
59582# Setup smart javac (after cores and memory have been setup)
59583
59584
59585# Check whether --with-sjavac-server-java was given.
59586if test "${with_sjavac_server_java+set}" = set; then :
59587  withval=$with_sjavac_server_java;
59588fi
59589
59590
59591  if test "x$with_sjavac_server_java" != x; then
59592    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
59593    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
59594    if test "x$FOUND_VERSION" = x; then
59595      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
59596    fi
59597  else
59598    SJAVAC_SERVER_JAVA="$JAVA"
59599  fi
59600
59601
59602  if test "$MEMORY_SIZE" -gt "3000"; then
59603
59604  $ECHO "Check if jvm arg is ok: -d64" >&5
59605  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
59606  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
59607  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59608  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59609  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59610    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
59611    JVM_ARG_OK=true
59612  else
59613    $ECHO "Arg failed:" >&5
59614    $ECHO "$OUTPUT" >&5
59615    JVM_ARG_OK=false
59616  fi
59617
59618    if test "$JVM_ARG_OK" = true; then
59619      JVM_64BIT=true
59620      JVM_ARG_OK=false
59621    fi
59622  fi
59623
59624  MX_VALUE=`expr $MEMORY_SIZE / 2`
59625  if test "$JVM_64BIT" = true; then
59626    # Set ms lower than mx since more than one instance of the server might
59627    # get launched at the same time before they figure out which instance won.
59628    MS_VALUE=512
59629    if test "$MX_VALUE" -gt "2048"; then
59630      MX_VALUE=2048
59631    fi
59632  else
59633    MS_VALUE=256
59634    if test "$MX_VALUE" -gt "1500"; then
59635      MX_VALUE=1500
59636    fi
59637  fi
59638  if test "$MX_VALUE" -lt "512"; then
59639    MX_VALUE=512
59640  fi
59641
59642  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
59643  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
59644  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
59645  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
59646  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
59647  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
59648    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
59649    JVM_ARG_OK=true
59650  else
59651    $ECHO "Arg failed:" >&5
59652    $ECHO "$OUTPUT" >&5
59653    JVM_ARG_OK=false
59654  fi
59655
59656
59657
59658  # Check whether --enable-sjavac was given.
59659if test "${enable_sjavac+set}" = set; then :
59660  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
59661else
59662  ENABLE_SJAVAC="no"
59663fi
59664
59665  if test "x$JVM_ARG_OK" = "xfalse"; then
59666    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
59667$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
59668    ENABLE_SJAVAC="no"
59669  fi
59670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
59671$as_echo_n "checking whether to use sjavac... " >&6; }
59672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
59673$as_echo "$ENABLE_SJAVAC" >&6; }
59674
59675
59676  # Check whether --enable-javac-server was given.
59677if test "${enable_javac_server+set}" = set; then :
59678  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
59679else
59680  ENABLE_JAVAC_SERVER="yes"
59681fi
59682
59683  if test "x$JVM_ARG_OK" = "xfalse"; then
59684    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
59685$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
59686    ENABLE_JAVAC_SERVER="no"
59687  fi
59688  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
59689$as_echo_n "checking whether to use javac server... " >&6; }
59690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
59691$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
59692
59693
59694  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
59695    # When using a server javac, the small client instances do not need much
59696    # resources.
59697    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
59698  fi
59699
59700
59701# Setup use of icecc if requested
59702
59703  # Check whether --enable-icecc was given.
59704if test "${enable_icecc+set}" = set; then :
59705  enableval=$enable_icecc;
59706fi
59707
59708
59709  if test "x${enable_icecc}" = "xyes"; then
59710
59711
59712
59713  # Publish this variable in the help.
59714
59715
59716  if [ -z "${ICECC_CMD+x}" ]; then
59717    # The variable is not set by user, try to locate tool using the code snippet
59718    for ac_prog in icecc
59719do
59720  # Extract the first word of "$ac_prog", so it can be a program name with args.
59721set dummy $ac_prog; ac_word=$2
59722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59723$as_echo_n "checking for $ac_word... " >&6; }
59724if ${ac_cv_path_ICECC_CMD+:} false; then :
59725  $as_echo_n "(cached) " >&6
59726else
59727  case $ICECC_CMD in
59728  [\\/]* | ?:[\\/]*)
59729  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59730  ;;
59731  *)
59732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59733for as_dir in $PATH
59734do
59735  IFS=$as_save_IFS
59736  test -z "$as_dir" && as_dir=.
59737    for ac_exec_ext in '' $ac_executable_extensions; do
59738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59739    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59741    break 2
59742  fi
59743done
59744  done
59745IFS=$as_save_IFS
59746
59747  ;;
59748esac
59749fi
59750ICECC_CMD=$ac_cv_path_ICECC_CMD
59751if test -n "$ICECC_CMD"; then
59752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59753$as_echo "$ICECC_CMD" >&6; }
59754else
59755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59756$as_echo "no" >&6; }
59757fi
59758
59759
59760  test -n "$ICECC_CMD" && break
59761done
59762
59763  else
59764    # The variable is set, but is it from the command line or the environment?
59765
59766    # Try to remove the string !ICECC_CMD! from our list.
59767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
59768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59769      # If it failed, the variable was not from the command line. Ignore it,
59770      # but warn the user (except for BASH, which is always set by the calling BASH).
59771      if test "xICECC_CMD" != xBASH; then
59772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
59773$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
59774      fi
59775      # Try to locate tool using the code snippet
59776      for ac_prog in icecc
59777do
59778  # Extract the first word of "$ac_prog", so it can be a program name with args.
59779set dummy $ac_prog; ac_word=$2
59780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59781$as_echo_n "checking for $ac_word... " >&6; }
59782if ${ac_cv_path_ICECC_CMD+:} false; then :
59783  $as_echo_n "(cached) " >&6
59784else
59785  case $ICECC_CMD in
59786  [\\/]* | ?:[\\/]*)
59787  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59788  ;;
59789  *)
59790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59791for as_dir in $PATH
59792do
59793  IFS=$as_save_IFS
59794  test -z "$as_dir" && as_dir=.
59795    for ac_exec_ext in '' $ac_executable_extensions; do
59796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59797    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59799    break 2
59800  fi
59801done
59802  done
59803IFS=$as_save_IFS
59804
59805  ;;
59806esac
59807fi
59808ICECC_CMD=$ac_cv_path_ICECC_CMD
59809if test -n "$ICECC_CMD"; then
59810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59811$as_echo "$ICECC_CMD" >&6; }
59812else
59813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59814$as_echo "no" >&6; }
59815fi
59816
59817
59818  test -n "$ICECC_CMD" && break
59819done
59820
59821    else
59822      # If it succeeded, then it was overridden by the user. We will use it
59823      # for the tool.
59824
59825      # First remove it from the list of overridden variables, so we can test
59826      # for unknown variables in the end.
59827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
59828
59829      # Check if we try to supply an empty value
59830      if test "x$ICECC_CMD" = x; then
59831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
59832$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
59833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59834$as_echo_n "checking for ICECC_CMD... " >&6; }
59835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
59836$as_echo "disabled" >&6; }
59837      else
59838        # Check if the provided tool contains a complete path.
59839        tool_specified="$ICECC_CMD"
59840        tool_basename="${tool_specified##*/}"
59841        if test "x$tool_basename" = "x$tool_specified"; then
59842          # A command without a complete path is provided, search $PATH.
59843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
59844$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
59845          # Extract the first word of "$tool_basename", so it can be a program name with args.
59846set dummy $tool_basename; ac_word=$2
59847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59848$as_echo_n "checking for $ac_word... " >&6; }
59849if ${ac_cv_path_ICECC_CMD+:} false; then :
59850  $as_echo_n "(cached) " >&6
59851else
59852  case $ICECC_CMD in
59853  [\\/]* | ?:[\\/]*)
59854  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
59855  ;;
59856  *)
59857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59858for as_dir in $PATH
59859do
59860  IFS=$as_save_IFS
59861  test -z "$as_dir" && as_dir=.
59862    for ac_exec_ext in '' $ac_executable_extensions; do
59863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59864    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
59865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59866    break 2
59867  fi
59868done
59869  done
59870IFS=$as_save_IFS
59871
59872  ;;
59873esac
59874fi
59875ICECC_CMD=$ac_cv_path_ICECC_CMD
59876if test -n "$ICECC_CMD"; then
59877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
59878$as_echo "$ICECC_CMD" >&6; }
59879else
59880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59881$as_echo "no" >&6; }
59882fi
59883
59884
59885          if test "x$ICECC_CMD" = x; then
59886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
59887          fi
59888        else
59889          # Otherwise we believe it is a complete path. Use it as it is.
59890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
59891$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
59892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
59893$as_echo_n "checking for ICECC_CMD... " >&6; }
59894          if test ! -x "$tool_specified"; then
59895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
59896$as_echo "not found" >&6; }
59897            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
59898          fi
59899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
59900$as_echo "$tool_specified" >&6; }
59901        fi
59902      fi
59903    fi
59904
59905  fi
59906
59907
59908
59909  if test "x$ICECC_CMD" = x; then
59910    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
59911  fi
59912
59913
59914    old_path="$PATH"
59915
59916    # Look for icecc-create-env in some known places
59917    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
59918
59919
59920
59921  # Publish this variable in the help.
59922
59923
59924  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
59925    # The variable is not set by user, try to locate tool using the code snippet
59926    for ac_prog in icecc-create-env
59927do
59928  # Extract the first word of "$ac_prog", so it can be a program name with args.
59929set dummy $ac_prog; ac_word=$2
59930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59931$as_echo_n "checking for $ac_word... " >&6; }
59932if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59933  $as_echo_n "(cached) " >&6
59934else
59935  case $ICECC_CREATE_ENV in
59936  [\\/]* | ?:[\\/]*)
59937  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59938  ;;
59939  *)
59940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59941for as_dir in $PATH
59942do
59943  IFS=$as_save_IFS
59944  test -z "$as_dir" && as_dir=.
59945    for ac_exec_ext in '' $ac_executable_extensions; do
59946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59947    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
59948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59949    break 2
59950  fi
59951done
59952  done
59953IFS=$as_save_IFS
59954
59955  ;;
59956esac
59957fi
59958ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
59959if test -n "$ICECC_CREATE_ENV"; then
59960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
59961$as_echo "$ICECC_CREATE_ENV" >&6; }
59962else
59963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59964$as_echo "no" >&6; }
59965fi
59966
59967
59968  test -n "$ICECC_CREATE_ENV" && break
59969done
59970
59971  else
59972    # The variable is set, but is it from the command line or the environment?
59973
59974    # Try to remove the string !ICECC_CREATE_ENV! from our list.
59975    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
59976    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
59977      # If it failed, the variable was not from the command line. Ignore it,
59978      # but warn the user (except for BASH, which is always set by the calling BASH).
59979      if test "xICECC_CREATE_ENV" != xBASH; then
59980        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
59981$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
59982      fi
59983      # Try to locate tool using the code snippet
59984      for ac_prog in icecc-create-env
59985do
59986  # Extract the first word of "$ac_prog", so it can be a program name with args.
59987set dummy $ac_prog; ac_word=$2
59988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59989$as_echo_n "checking for $ac_word... " >&6; }
59990if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
59991  $as_echo_n "(cached) " >&6
59992else
59993  case $ICECC_CREATE_ENV in
59994  [\\/]* | ?:[\\/]*)
59995  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
59996  ;;
59997  *)
59998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
59999for as_dir in $PATH
60000do
60001  IFS=$as_save_IFS
60002  test -z "$as_dir" && as_dir=.
60003    for ac_exec_ext in '' $ac_executable_extensions; do
60004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60005    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
60006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60007    break 2
60008  fi
60009done
60010  done
60011IFS=$as_save_IFS
60012
60013  ;;
60014esac
60015fi
60016ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
60017if test -n "$ICECC_CREATE_ENV"; then
60018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
60019$as_echo "$ICECC_CREATE_ENV" >&6; }
60020else
60021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60022$as_echo "no" >&6; }
60023fi
60024
60025
60026  test -n "$ICECC_CREATE_ENV" && break
60027done
60028
60029    else
60030      # If it succeeded, then it was overridden by the user. We will use it
60031      # for the tool.
60032
60033      # First remove it from the list of overridden variables, so we can test
60034      # for unknown variables in the end.
60035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60036
60037      # Check if we try to supply an empty value
60038      if test "x$ICECC_CREATE_ENV" = x; then
60039        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
60040$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
60041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
60042$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
60043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60044$as_echo "disabled" >&6; }
60045      else
60046        # Check if the provided tool contains a complete path.
60047        tool_specified="$ICECC_CREATE_ENV"
60048        tool_basename="${tool_specified##*/}"
60049        if test "x$tool_basename" = "x$tool_specified"; then
60050          # A command without a complete path is provided, search $PATH.
60051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
60052$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
60053          # Extract the first word of "$tool_basename", so it can be a program name with args.
60054set dummy $tool_basename; ac_word=$2
60055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60056$as_echo_n "checking for $ac_word... " >&6; }
60057if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
60058  $as_echo_n "(cached) " >&6
60059else
60060  case $ICECC_CREATE_ENV in
60061  [\\/]* | ?:[\\/]*)
60062  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
60063  ;;
60064  *)
60065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60066for as_dir in $PATH
60067do
60068  IFS=$as_save_IFS
60069  test -z "$as_dir" && as_dir=.
60070    for ac_exec_ext in '' $ac_executable_extensions; do
60071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60072    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
60073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60074    break 2
60075  fi
60076done
60077  done
60078IFS=$as_save_IFS
60079
60080  ;;
60081esac
60082fi
60083ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
60084if test -n "$ICECC_CREATE_ENV"; then
60085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
60086$as_echo "$ICECC_CREATE_ENV" >&6; }
60087else
60088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60089$as_echo "no" >&6; }
60090fi
60091
60092
60093          if test "x$ICECC_CREATE_ENV" = x; then
60094            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60095          fi
60096        else
60097          # Otherwise we believe it is a complete path. Use it as it is.
60098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
60099$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
60100          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
60101$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
60102          if test ! -x "$tool_specified"; then
60103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60104$as_echo "not found" >&6; }
60105            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
60106          fi
60107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60108$as_echo "$tool_specified" >&6; }
60109        fi
60110      fi
60111    fi
60112
60113  fi
60114
60115
60116
60117  if test "x$ICECC_CREATE_ENV" = x; then
60118    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
60119  fi
60120
60121
60122    # Use icecc-create-env to create a minimal compilation environment that can
60123    # be sent to the other hosts in the icecream cluster.
60124    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
60125    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
60126    # Older versions of icecc does not have the --gcc parameter
60127    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
60128      icecc_gcc_arg="--gcc"
60129    fi
60130    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
60131
60132  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60133      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
60134          ${icecc_create_env_log} 2>&1
60135  if test "$?" != "0"; then
60136    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60137$as_echo "$as_me: icecc-create-env output:" >&6;}
60138    cat \
60139          ${icecc_create_env_log}
60140    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60141  fi
60142
60143    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
60144      # For clang, the icecc compilerwrapper is needed. It usually resides next
60145      # to icecc-create-env.
60146
60147
60148
60149  # Publish this variable in the help.
60150
60151
60152  if [ -z "${ICECC_WRAPPER+x}" ]; then
60153    # The variable is not set by user, try to locate tool using the code snippet
60154    for ac_prog in compilerwrapper
60155do
60156  # Extract the first word of "$ac_prog", so it can be a program name with args.
60157set dummy $ac_prog; ac_word=$2
60158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60159$as_echo_n "checking for $ac_word... " >&6; }
60160if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60161  $as_echo_n "(cached) " >&6
60162else
60163  case $ICECC_WRAPPER in
60164  [\\/]* | ?:[\\/]*)
60165  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60166  ;;
60167  *)
60168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60169for as_dir in $PATH
60170do
60171  IFS=$as_save_IFS
60172  test -z "$as_dir" && as_dir=.
60173    for ac_exec_ext in '' $ac_executable_extensions; do
60174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60175    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60177    break 2
60178  fi
60179done
60180  done
60181IFS=$as_save_IFS
60182
60183  ;;
60184esac
60185fi
60186ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60187if test -n "$ICECC_WRAPPER"; then
60188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60189$as_echo "$ICECC_WRAPPER" >&6; }
60190else
60191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60192$as_echo "no" >&6; }
60193fi
60194
60195
60196  test -n "$ICECC_WRAPPER" && break
60197done
60198
60199  else
60200    # The variable is set, but is it from the command line or the environment?
60201
60202    # Try to remove the string !ICECC_WRAPPER! from our list.
60203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
60204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60205      # If it failed, the variable was not from the command line. Ignore it,
60206      # but warn the user (except for BASH, which is always set by the calling BASH).
60207      if test "xICECC_WRAPPER" != xBASH; then
60208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
60209$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
60210      fi
60211      # Try to locate tool using the code snippet
60212      for ac_prog in compilerwrapper
60213do
60214  # Extract the first word of "$ac_prog", so it can be a program name with args.
60215set dummy $ac_prog; ac_word=$2
60216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60217$as_echo_n "checking for $ac_word... " >&6; }
60218if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60219  $as_echo_n "(cached) " >&6
60220else
60221  case $ICECC_WRAPPER in
60222  [\\/]* | ?:[\\/]*)
60223  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60224  ;;
60225  *)
60226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60227for as_dir in $PATH
60228do
60229  IFS=$as_save_IFS
60230  test -z "$as_dir" && as_dir=.
60231    for ac_exec_ext in '' $ac_executable_extensions; do
60232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60233    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60235    break 2
60236  fi
60237done
60238  done
60239IFS=$as_save_IFS
60240
60241  ;;
60242esac
60243fi
60244ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60245if test -n "$ICECC_WRAPPER"; then
60246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60247$as_echo "$ICECC_WRAPPER" >&6; }
60248else
60249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60250$as_echo "no" >&6; }
60251fi
60252
60253
60254  test -n "$ICECC_WRAPPER" && break
60255done
60256
60257    else
60258      # If it succeeded, then it was overridden by the user. We will use it
60259      # for the tool.
60260
60261      # First remove it from the list of overridden variables, so we can test
60262      # for unknown variables in the end.
60263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60264
60265      # Check if we try to supply an empty value
60266      if test "x$ICECC_WRAPPER" = x; then
60267        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
60268$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
60269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
60270$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
60271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60272$as_echo "disabled" >&6; }
60273      else
60274        # Check if the provided tool contains a complete path.
60275        tool_specified="$ICECC_WRAPPER"
60276        tool_basename="${tool_specified##*/}"
60277        if test "x$tool_basename" = "x$tool_specified"; then
60278          # A command without a complete path is provided, search $PATH.
60279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
60280$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
60281          # Extract the first word of "$tool_basename", so it can be a program name with args.
60282set dummy $tool_basename; ac_word=$2
60283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60284$as_echo_n "checking for $ac_word... " >&6; }
60285if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
60286  $as_echo_n "(cached) " >&6
60287else
60288  case $ICECC_WRAPPER in
60289  [\\/]* | ?:[\\/]*)
60290  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
60291  ;;
60292  *)
60293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60294for as_dir in $PATH
60295do
60296  IFS=$as_save_IFS
60297  test -z "$as_dir" && as_dir=.
60298    for ac_exec_ext in '' $ac_executable_extensions; do
60299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60300    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
60301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60302    break 2
60303  fi
60304done
60305  done
60306IFS=$as_save_IFS
60307
60308  ;;
60309esac
60310fi
60311ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
60312if test -n "$ICECC_WRAPPER"; then
60313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
60314$as_echo "$ICECC_WRAPPER" >&6; }
60315else
60316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60317$as_echo "no" >&6; }
60318fi
60319
60320
60321          if test "x$ICECC_WRAPPER" = x; then
60322            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60323          fi
60324        else
60325          # Otherwise we believe it is a complete path. Use it as it is.
60326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
60327$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
60328          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
60329$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
60330          if test ! -x "$tool_specified"; then
60331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60332$as_echo "not found" >&6; }
60333            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
60334          fi
60335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60336$as_echo "$tool_specified" >&6; }
60337        fi
60338      fi
60339    fi
60340
60341  fi
60342
60343
60344
60345  if test "x$ICECC_WRAPPER" = x; then
60346    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
60347  fi
60348
60349
60350
60351  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60352      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1
60353  if test "$?" != "0"; then
60354    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60355$as_echo "$as_me: icecc-create-env output:" >&6;}
60356    cat ${icecc_create_env_log}
60357    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60358  fi
60359
60360    else
60361      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
60362    fi
60363    PATH="$old_path"
60364    # The bundle with the compiler gets a name based on checksums. Parse log file
60365    # to find it.
60366    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
60367    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60368    if test ! -f ${ICECC_ENV_BUNDLE}; then
60369      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60370    fi
60371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
60372$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
60373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60374$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60375    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
60376
60377    if test "x${COMPILE_TYPE}" = "xcross"; then
60378      # If cross compiling, create a separate env package for the build compiler
60379      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
60380      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
60381      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
60382
60383  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60384      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
60385            ${icecc_create_env_log_build} 2>&1
60386  if test "$?" != "0"; then
60387    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60388$as_echo "$as_me: icecc-create-env output:" >&6;}
60389    cat \
60390            ${icecc_create_env_log_build}
60391    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60392  fi
60393
60394      elif test "x${BUILD_CC##*/}" = "xclang"; then
60395
60396  cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
60397      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1
60398  if test "$?" != "0"; then
60399    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
60400$as_echo "$as_me: icecc-create-env output:" >&6;}
60401    cat ${icecc_create_env_log_build}
60402    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
60403  fi
60404
60405      else
60406        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
60407      fi
60408      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
60409      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
60410      if test ! -f ${ICECC_ENV_BUNDLE}; then
60411        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
60412      fi
60413      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
60414$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
60415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
60416$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
60417      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
60418          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
60419    else
60420      BUILD_ICECC="${ICECC}"
60421    fi
60422
60423
60424  fi
60425
60426
60427# Can the C/C++ compiler use precompiled headers?
60428
60429
60430  ###############################################################################
60431  #
60432  # Can the C/C++ compiler use precompiled headers?
60433  #
60434  # Check whether --enable-precompiled-headers was given.
60435if test "${enable_precompiled_headers+set}" = set; then :
60436  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
60437else
60438  ENABLE_PRECOMPH=yes
60439fi
60440
60441
60442  USE_PRECOMPILED_HEADER=1
60443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
60444$as_echo_n "checking If precompiled header is enabled... " >&6; }
60445  if test "x$ENABLE_PRECOMPH" = xno; then
60446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
60447$as_echo "no, forced" >&6; }
60448    USE_PRECOMPILED_HEADER=0
60449  elif test "x$ICECC" != "x"; then
60450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
60451$as_echo "no, does not work effectively with icecc" >&6; }
60452    USE_PRECOMPILED_HEADER=0
60453  else
60454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60455$as_echo "yes" >&6; }
60456  fi
60457
60458  if test "x$ENABLE_PRECOMPH" = xyes; then
60459    # Check that the compiler actually supports precomp headers.
60460    if test "x$TOOLCHAIN_TYPE" = xgcc; then
60461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
60462$as_echo_n "checking that precompiled headers work... " >&6; }
60463      echo "int alfa();" > conftest.h
60464      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
60465      if test ! -f conftest.hpp.gch; then
60466        USE_PRECOMPILED_HEADER=0
60467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60468$as_echo "no" >&6; }
60469      else
60470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60471$as_echo "yes" >&6; }
60472      fi
60473      rm -f conftest.h conftest.hpp.gch
60474    fi
60475  fi
60476
60477
60478
60479
60480# Setup use of ccache, if available
60481
60482  # Check whether --enable-ccache was given.
60483if test "${enable_ccache+set}" = set; then :
60484  enableval=$enable_ccache;
60485fi
60486
60487
60488  CCACHE=
60489  CCACHE_STATUS=
60490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
60491$as_echo_n "checking is ccache enabled... " >&6; }
60492  if test "x$enable_ccache" = xyes; then
60493    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
60494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60495$as_echo "yes" >&6; }
60496      OLD_PATH="$PATH"
60497      if test "x$TOOLCHAIN_PATH" != x; then
60498        PATH=$TOOLCHAIN_PATH:$PATH
60499      fi
60500
60501
60502
60503  # Publish this variable in the help.
60504
60505
60506  if [ -z "${CCACHE+x}" ]; then
60507    # The variable is not set by user, try to locate tool using the code snippet
60508    for ac_prog in ccache
60509do
60510  # Extract the first word of "$ac_prog", so it can be a program name with args.
60511set dummy $ac_prog; ac_word=$2
60512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60513$as_echo_n "checking for $ac_word... " >&6; }
60514if ${ac_cv_path_CCACHE+:} false; then :
60515  $as_echo_n "(cached) " >&6
60516else
60517  case $CCACHE in
60518  [\\/]* | ?:[\\/]*)
60519  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60520  ;;
60521  *)
60522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60523for as_dir in $PATH
60524do
60525  IFS=$as_save_IFS
60526  test -z "$as_dir" && as_dir=.
60527    for ac_exec_ext in '' $ac_executable_extensions; do
60528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60529    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60531    break 2
60532  fi
60533done
60534  done
60535IFS=$as_save_IFS
60536
60537  ;;
60538esac
60539fi
60540CCACHE=$ac_cv_path_CCACHE
60541if test -n "$CCACHE"; then
60542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60543$as_echo "$CCACHE" >&6; }
60544else
60545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60546$as_echo "no" >&6; }
60547fi
60548
60549
60550  test -n "$CCACHE" && break
60551done
60552
60553  else
60554    # The variable is set, but is it from the command line or the environment?
60555
60556    # Try to remove the string !CCACHE! from our list.
60557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
60558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
60559      # If it failed, the variable was not from the command line. Ignore it,
60560      # but warn the user (except for BASH, which is always set by the calling BASH).
60561      if test "xCCACHE" != xBASH; then
60562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
60563$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
60564      fi
60565      # Try to locate tool using the code snippet
60566      for ac_prog in ccache
60567do
60568  # Extract the first word of "$ac_prog", so it can be a program name with args.
60569set dummy $ac_prog; ac_word=$2
60570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60571$as_echo_n "checking for $ac_word... " >&6; }
60572if ${ac_cv_path_CCACHE+:} false; then :
60573  $as_echo_n "(cached) " >&6
60574else
60575  case $CCACHE in
60576  [\\/]* | ?:[\\/]*)
60577  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60578  ;;
60579  *)
60580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60581for as_dir in $PATH
60582do
60583  IFS=$as_save_IFS
60584  test -z "$as_dir" && as_dir=.
60585    for ac_exec_ext in '' $ac_executable_extensions; do
60586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60587    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60589    break 2
60590  fi
60591done
60592  done
60593IFS=$as_save_IFS
60594
60595  ;;
60596esac
60597fi
60598CCACHE=$ac_cv_path_CCACHE
60599if test -n "$CCACHE"; then
60600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60601$as_echo "$CCACHE" >&6; }
60602else
60603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60604$as_echo "no" >&6; }
60605fi
60606
60607
60608  test -n "$CCACHE" && break
60609done
60610
60611    else
60612      # If it succeeded, then it was overridden by the user. We will use it
60613      # for the tool.
60614
60615      # First remove it from the list of overridden variables, so we can test
60616      # for unknown variables in the end.
60617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
60618
60619      # Check if we try to supply an empty value
60620      if test "x$CCACHE" = x; then
60621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
60622$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
60623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60624$as_echo_n "checking for CCACHE... " >&6; }
60625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
60626$as_echo "disabled" >&6; }
60627      else
60628        # Check if the provided tool contains a complete path.
60629        tool_specified="$CCACHE"
60630        tool_basename="${tool_specified##*/}"
60631        if test "x$tool_basename" = "x$tool_specified"; then
60632          # A command without a complete path is provided, search $PATH.
60633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
60634$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
60635          # Extract the first word of "$tool_basename", so it can be a program name with args.
60636set dummy $tool_basename; ac_word=$2
60637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60638$as_echo_n "checking for $ac_word... " >&6; }
60639if ${ac_cv_path_CCACHE+:} false; then :
60640  $as_echo_n "(cached) " >&6
60641else
60642  case $CCACHE in
60643  [\\/]* | ?:[\\/]*)
60644  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
60645  ;;
60646  *)
60647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
60648for as_dir in $PATH
60649do
60650  IFS=$as_save_IFS
60651  test -z "$as_dir" && as_dir=.
60652    for ac_exec_ext in '' $ac_executable_extensions; do
60653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60654    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
60655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60656    break 2
60657  fi
60658done
60659  done
60660IFS=$as_save_IFS
60661
60662  ;;
60663esac
60664fi
60665CCACHE=$ac_cv_path_CCACHE
60666if test -n "$CCACHE"; then
60667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
60668$as_echo "$CCACHE" >&6; }
60669else
60670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60671$as_echo "no" >&6; }
60672fi
60673
60674
60675          if test "x$CCACHE" = x; then
60676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
60677          fi
60678        else
60679          # Otherwise we believe it is a complete path. Use it as it is.
60680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
60681$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
60682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
60683$as_echo_n "checking for CCACHE... " >&6; }
60684          if test ! -x "$tool_specified"; then
60685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60686$as_echo "not found" >&6; }
60687            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
60688          fi
60689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
60690$as_echo "$tool_specified" >&6; }
60691        fi
60692      fi
60693    fi
60694
60695  fi
60696
60697
60698
60699  if test "x$CCACHE" = x; then
60700    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
60701  fi
60702
60703
60704      PATH="$OLD_PATH"
60705      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
60706      CCACHE_STATUS="Active ($CCACHE_VERSION)"
60707    else
60708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60709$as_echo "no" >&6; }
60710      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
60711$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
60712    fi
60713  elif test "x$enable_ccache" = xno; then
60714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
60715$as_echo "no, explicitly disabled" >&6; }
60716    CCACHE_STATUS="Disabled"
60717  elif test "x$enable_ccache" = x; then
60718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60719$as_echo "no" >&6; }
60720  else
60721    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
60722$as_echo "unknown" >&6; }
60723    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
60724  fi
60725
60726
60727
60728# Check whether --with-ccache-dir was given.
60729if test "${with_ccache_dir+set}" = set; then :
60730  withval=$with_ccache_dir;
60731fi
60732
60733
60734  if test "x$with_ccache_dir" != x; then
60735    # When using a non home ccache directory, assume the use is to share ccache files
60736    # with other users. Thus change the umask.
60737    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
60738    if test "x$CCACHE" = x; then
60739      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
60740$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
60741    fi
60742  fi
60743
60744  if test "x$CCACHE" != x; then
60745
60746  if test "x$CCACHE" != x; then
60747    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
60748      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
60749          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
60750      if test "x$HAS_BAD_CCACHE" != "x"; then
60751        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
60752      fi
60753      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
60754$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
60755      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
60756      PUSHED_FLAGS="$CXXFLAGS"
60757      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
60758      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60759/* end confdefs.h.  */
60760
60761int
60762main ()
60763{
60764
60765  ;
60766  return 0;
60767}
60768_ACEOF
60769if ac_fn_cxx_try_compile "$LINENO"; then :
60770  CC_KNOWS_CCACHE_TRICK=yes
60771else
60772  CC_KNOWS_CCACHE_TRICK=no
60773fi
60774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
60775      CXXFLAGS="$PUSHED_FLAGS"
60776      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
60777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60778$as_echo "yes" >&6; }
60779        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
60780
60781        CCACHE_SLOPPINESS=pch_defines,time_macros
60782      else
60783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60784$as_echo "no" >&6; }
60785        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
60786      fi
60787    fi
60788
60789    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
60790        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
60791
60792    if test "x$SET_CCACHE_DIR" != x; then
60793      mkdir -p $CCACHE_DIR > /dev/null 2>&1
60794      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
60795    fi
60796  fi
60797
60798  fi
60799
60800
60801###############################################################################
60802#
60803# And now the finish...
60804#
60805###############################################################################
60806
60807# Check for some common pitfalls
60808
60809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60810    file_to_test="$SRC_ROOT/LICENSE"
60811    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
60812      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
60813    fi
60814  fi
60815
60816
60817  # Did user specify any unknown variables?
60818
60819  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
60820    # Replace the separating ! with spaces before presenting for end user.
60821    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
60822    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
60823$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
60824  fi
60825
60826
60827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
60828$as_echo_n "checking if build directory is on local disk... " >&6; }
60829
60830  # df -l lists only local disks; if the given directory is not found then
60831  # a non-zero exit code is given
60832  if test "x$DF" = x; then
60833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60834      # msys does not have df; use Windows "net use" instead.
60835      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
60836      if test "x$IS_NETWORK_DISK" = x; then
60837        OUTPUT_DIR_IS_LOCAL="yes"
60838      else
60839        OUTPUT_DIR_IS_LOCAL="no"
60840      fi
60841    else
60842      # No df here, say it's local
60843      OUTPUT_DIR_IS_LOCAL="yes"
60844    fi
60845  else
60846    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
60847      OUTPUT_DIR_IS_LOCAL="yes"
60848    else
60849      OUTPUT_DIR_IS_LOCAL="no"
60850    fi
60851  fi
60852
60853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
60854$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
60855
60856
60857
60858  # Check if the user has any old-style ALT_ variables set.
60859  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
60860
60861  # Before generating output files, test if they exist. If they do, this is a reconfigure.
60862  # Since we can't properly handle the dependencies for this, warn the user about the situation
60863  if test -e $OUTPUT_ROOT/spec.gmk; then
60864    IS_RECONFIGURE=yes
60865  else
60866    IS_RECONFIGURE=no
60867  fi
60868
60869
60870# At the end, call the custom hook. (Dummy macro if no custom sources available)
60871
60872
60873# We're messing a bit with internal autoconf variables to put the config.status
60874# in the output directory instead of the current directory.
60875CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
60876
60877# Create the actual output files. Now the main work of configure is done.
60878cat >confcache <<\_ACEOF
60879# This file is a shell script that caches the results of configure
60880# tests run on this system so they can be shared between configure
60881# scripts and configure runs, see configure's option --config-cache.
60882# It is not useful on other systems.  If it contains results you don't
60883# want to keep, you may remove or edit it.
60884#
60885# config.status only pays attention to the cache file if you give it
60886# the --recheck option to rerun configure.
60887#
60888# `ac_cv_env_foo' variables (set or unset) will be overridden when
60889# loading this file, other *unset* `ac_cv_foo' will be assigned the
60890# following values.
60891
60892_ACEOF
60893
60894# The following way of writing the cache mishandles newlines in values,
60895# but we know of no workaround that is simple, portable, and efficient.
60896# So, we kill variables containing newlines.
60897# Ultrix sh set writes to stderr and can't be redirected directly,
60898# and sets the high bit in the cache file unless we assign to the vars.
60899(
60900  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
60901    eval ac_val=\$$ac_var
60902    case $ac_val in #(
60903    *${as_nl}*)
60904      case $ac_var in #(
60905      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
60906$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
60907      esac
60908      case $ac_var in #(
60909      _ | IFS | as_nl) ;; #(
60910      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
60911      *) { eval $ac_var=; unset $ac_var;} ;;
60912      esac ;;
60913    esac
60914  done
60915
60916  (set) 2>&1 |
60917    case $as_nl`(ac_space=' '; set) 2>&1` in #(
60918    *${as_nl}ac_space=\ *)
60919      # `set' does not quote correctly, so add quotes: double-quote
60920      # substitution turns \\\\ into \\, and sed turns \\ into \.
60921      sed -n \
60922	"s/'/'\\\\''/g;
60923	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
60924      ;; #(
60925    *)
60926      # `set' quotes correctly as required by POSIX, so do not add quotes.
60927      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
60928      ;;
60929    esac |
60930    sort
60931) |
60932  sed '
60933     /^ac_cv_env_/b end
60934     t clear
60935     :clear
60936     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
60937     t end
60938     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
60939     :end' >>confcache
60940if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
60941  if test -w "$cache_file"; then
60942    if test "x$cache_file" != "x/dev/null"; then
60943      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
60944$as_echo "$as_me: updating cache $cache_file" >&6;}
60945      if test ! -f "$cache_file" || test -h "$cache_file"; then
60946	cat confcache >"$cache_file"
60947      else
60948        case $cache_file in #(
60949        */* | ?:*)
60950	  mv -f confcache "$cache_file"$$ &&
60951	  mv -f "$cache_file"$$ "$cache_file" ;; #(
60952        *)
60953	  mv -f confcache "$cache_file" ;;
60954	esac
60955      fi
60956    fi
60957  else
60958    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
60959$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
60960  fi
60961fi
60962rm -f confcache
60963
60964test "x$prefix" = xNONE && prefix=$ac_default_prefix
60965# Let make expand exec_prefix.
60966test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
60967
60968# Transform confdefs.h into DEFS.
60969# Protect against shell expansion while executing Makefile rules.
60970# Protect against Makefile macro expansion.
60971#
60972# If the first sed substitution is executed (which looks for macros that
60973# take arguments), then branch to the quote section.  Otherwise,
60974# look for a macro that doesn't take arguments.
60975ac_script='
60976:mline
60977/\\$/{
60978 N
60979 s,\\\n,,
60980 b mline
60981}
60982t clear
60983:clear
60984s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
60985t quote
60986s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
60987t quote
60988b any
60989:quote
60990s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
60991s/\[/\\&/g
60992s/\]/\\&/g
60993s/\$/$$/g
60994H
60995:any
60996${
60997	g
60998	s/^\n//
60999	s/\n/ /g
61000	p
61001}
61002'
61003DEFS=`sed -n "$ac_script" confdefs.h`
61004
61005
61006ac_libobjs=
61007ac_ltlibobjs=
61008U=
61009for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
61010  # 1. Remove the extension, and $U if already installed.
61011  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
61012  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
61013  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
61014  #    will be set to the directory where LIBOBJS objects are built.
61015  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
61016  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
61017done
61018LIBOBJS=$ac_libobjs
61019
61020LTLIBOBJS=$ac_ltlibobjs
61021
61022
61023
61024: "${CONFIG_STATUS=./config.status}"
61025ac_write_fail=0
61026ac_clean_files_save=$ac_clean_files
61027ac_clean_files="$ac_clean_files $CONFIG_STATUS"
61028{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
61029$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
61030as_write_fail=0
61031cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
61032#! $SHELL
61033# Generated by $as_me.
61034# Run this file to recreate the current configuration.
61035# Compiler output produced by configure, useful for debugging
61036# configure, is in config.log if it exists.
61037
61038debug=false
61039ac_cs_recheck=false
61040ac_cs_silent=false
61041
61042SHELL=\${CONFIG_SHELL-$SHELL}
61043export SHELL
61044_ASEOF
61045cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
61046## -------------------- ##
61047## M4sh Initialization. ##
61048## -------------------- ##
61049
61050# Be more Bourne compatible
61051DUALCASE=1; export DUALCASE # for MKS sh
61052if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
61053  emulate sh
61054  NULLCMD=:
61055  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
61056  # is contrary to our usage.  Disable this feature.
61057  alias -g '${1+"$@"}'='"$@"'
61058  setopt NO_GLOB_SUBST
61059else
61060  case `(set -o) 2>/dev/null` in #(
61061  *posix*) :
61062    set -o posix ;; #(
61063  *) :
61064     ;;
61065esac
61066fi
61067
61068
61069as_nl='
61070'
61071export as_nl
61072# Printing a long string crashes Solaris 7 /usr/bin/printf.
61073as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
61074as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
61075as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
61076# Prefer a ksh shell builtin over an external printf program on Solaris,
61077# but without wasting forks for bash or zsh.
61078if test -z "$BASH_VERSION$ZSH_VERSION" \
61079    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
61080  as_echo='print -r --'
61081  as_echo_n='print -rn --'
61082elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
61083  as_echo='printf %s\n'
61084  as_echo_n='printf %s'
61085else
61086  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
61087    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61088    as_echo_n='/usr/ucb/echo -n'
61089  else
61090    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61091    as_echo_n_body='eval
61092      arg=$1;
61093      case $arg in #(
61094      *"$as_nl"*)
61095	expr "X$arg" : "X\\(.*\\)$as_nl";
61096	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
61097      esac;
61098      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
61099    '
61100    export as_echo_n_body
61101    as_echo_n='sh -c $as_echo_n_body as_echo'
61102  fi
61103  export as_echo_body
61104  as_echo='sh -c $as_echo_body as_echo'
61105fi
61106
61107# The user is always right.
61108if test "${PATH_SEPARATOR+set}" != set; then
61109  PATH_SEPARATOR=:
61110  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
61111    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
61112      PATH_SEPARATOR=';'
61113  }
61114fi
61115
61116
61117# IFS
61118# We need space, tab and new line, in precisely that order.  Quoting is
61119# there to prevent editors from complaining about space-tab.
61120# (If _AS_PATH_WALK were called with IFS unset, it would disable word
61121# splitting by setting IFS to empty value.)
61122IFS=" ""	$as_nl"
61123
61124# Find who we are.  Look in the path if we contain no directory separator.
61125as_myself=
61126case $0 in #((
61127  *[\\/]* ) as_myself=$0 ;;
61128  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
61129for as_dir in $PATH
61130do
61131  IFS=$as_save_IFS
61132  test -z "$as_dir" && as_dir=.
61133    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
61134  done
61135IFS=$as_save_IFS
61136
61137     ;;
61138esac
61139# We did not find ourselves, most probably we were run as `sh COMMAND'
61140# in which case we are not to be found in the path.
61141if test "x$as_myself" = x; then
61142  as_myself=$0
61143fi
61144if test ! -f "$as_myself"; then
61145  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
61146  exit 1
61147fi
61148
61149# Unset variables that we do not need and which cause bugs (e.g. in
61150# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
61151# suppresses any "Segmentation fault" message there.  '((' could
61152# trigger a bug in pdksh 5.2.14.
61153for as_var in BASH_ENV ENV MAIL MAILPATH
61154do eval test x\${$as_var+set} = xset \
61155  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
61156done
61157PS1='$ '
61158PS2='> '
61159PS4='+ '
61160
61161# NLS nuisances.
61162LC_ALL=C
61163export LC_ALL
61164LANGUAGE=C
61165export LANGUAGE
61166
61167# CDPATH.
61168(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
61169
61170
61171# as_fn_error STATUS ERROR [LINENO LOG_FD]
61172# ----------------------------------------
61173# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
61174# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
61175# script with STATUS, using 1 if that was 0.
61176as_fn_error ()
61177{
61178  as_status=$1; test $as_status -eq 0 && as_status=1
61179  if test "$4"; then
61180    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
61181    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
61182  fi
61183  $as_echo "$as_me: error: $2" >&2
61184  as_fn_exit $as_status
61185} # as_fn_error
61186
61187
61188# as_fn_set_status STATUS
61189# -----------------------
61190# Set $? to STATUS, without forking.
61191as_fn_set_status ()
61192{
61193  return $1
61194} # as_fn_set_status
61195
61196# as_fn_exit STATUS
61197# -----------------
61198# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
61199as_fn_exit ()
61200{
61201  set +e
61202  as_fn_set_status $1
61203  exit $1
61204} # as_fn_exit
61205
61206# as_fn_unset VAR
61207# ---------------
61208# Portably unset VAR.
61209as_fn_unset ()
61210{
61211  { eval $1=; unset $1;}
61212}
61213as_unset=as_fn_unset
61214# as_fn_append VAR VALUE
61215# ----------------------
61216# Append the text in VALUE to the end of the definition contained in VAR. Take
61217# advantage of any shell optimizations that allow amortized linear growth over
61218# repeated appends, instead of the typical quadratic growth present in naive
61219# implementations.
61220if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
61221  eval 'as_fn_append ()
61222  {
61223    eval $1+=\$2
61224  }'
61225else
61226  as_fn_append ()
61227  {
61228    eval $1=\$$1\$2
61229  }
61230fi # as_fn_append
61231
61232# as_fn_arith ARG...
61233# ------------------
61234# Perform arithmetic evaluation on the ARGs, and store the result in the
61235# global $as_val. Take advantage of shells that can avoid forks. The arguments
61236# must be portable across $(()) and expr.
61237if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
61238  eval 'as_fn_arith ()
61239  {
61240    as_val=$(( $* ))
61241  }'
61242else
61243  as_fn_arith ()
61244  {
61245    as_val=`expr "$@" || test $? -eq 1`
61246  }
61247fi # as_fn_arith
61248
61249
61250if expr a : '\(a\)' >/dev/null 2>&1 &&
61251   test "X`expr 00001 : '.*\(...\)'`" = X001; then
61252  as_expr=expr
61253else
61254  as_expr=false
61255fi
61256
61257if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
61258  as_basename=basename
61259else
61260  as_basename=false
61261fi
61262
61263if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
61264  as_dirname=dirname
61265else
61266  as_dirname=false
61267fi
61268
61269as_me=`$as_basename -- "$0" ||
61270$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
61271	 X"$0" : 'X\(//\)$' \| \
61272	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
61273$as_echo X/"$0" |
61274    sed '/^.*\/\([^/][^/]*\)\/*$/{
61275	    s//\1/
61276	    q
61277	  }
61278	  /^X\/\(\/\/\)$/{
61279	    s//\1/
61280	    q
61281	  }
61282	  /^X\/\(\/\).*/{
61283	    s//\1/
61284	    q
61285	  }
61286	  s/.*/./; q'`
61287
61288# Avoid depending upon Character Ranges.
61289as_cr_letters='abcdefghijklmnopqrstuvwxyz'
61290as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
61291as_cr_Letters=$as_cr_letters$as_cr_LETTERS
61292as_cr_digits='0123456789'
61293as_cr_alnum=$as_cr_Letters$as_cr_digits
61294
61295ECHO_C= ECHO_N= ECHO_T=
61296case `echo -n x` in #(((((
61297-n*)
61298  case `echo 'xy\c'` in
61299  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
61300  xy)  ECHO_C='\c';;
61301  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
61302       ECHO_T='	';;
61303  esac;;
61304*)
61305  ECHO_N='-n';;
61306esac
61307
61308rm -f conf$$ conf$$.exe conf$$.file
61309if test -d conf$$.dir; then
61310  rm -f conf$$.dir/conf$$.file
61311else
61312  rm -f conf$$.dir
61313  mkdir conf$$.dir 2>/dev/null
61314fi
61315if (echo >conf$$.file) 2>/dev/null; then
61316  if ln -s conf$$.file conf$$ 2>/dev/null; then
61317    as_ln_s='ln -s'
61318    # ... but there are two gotchas:
61319    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
61320    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
61321    # In both cases, we have to default to `cp -pR'.
61322    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
61323      as_ln_s='cp -pR'
61324  elif ln conf$$.file conf$$ 2>/dev/null; then
61325    as_ln_s=ln
61326  else
61327    as_ln_s='cp -pR'
61328  fi
61329else
61330  as_ln_s='cp -pR'
61331fi
61332rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
61333rmdir conf$$.dir 2>/dev/null
61334
61335
61336# as_fn_mkdir_p
61337# -------------
61338# Create "$as_dir" as a directory, including parents if necessary.
61339as_fn_mkdir_p ()
61340{
61341
61342  case $as_dir in #(
61343  -*) as_dir=./$as_dir;;
61344  esac
61345  test -d "$as_dir" || eval $as_mkdir_p || {
61346    as_dirs=
61347    while :; do
61348      case $as_dir in #(
61349      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
61350      *) as_qdir=$as_dir;;
61351      esac
61352      as_dirs="'$as_qdir' $as_dirs"
61353      as_dir=`$as_dirname -- "$as_dir" ||
61354$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61355	 X"$as_dir" : 'X\(//\)[^/]' \| \
61356	 X"$as_dir" : 'X\(//\)$' \| \
61357	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
61358$as_echo X"$as_dir" |
61359    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61360	    s//\1/
61361	    q
61362	  }
61363	  /^X\(\/\/\)[^/].*/{
61364	    s//\1/
61365	    q
61366	  }
61367	  /^X\(\/\/\)$/{
61368	    s//\1/
61369	    q
61370	  }
61371	  /^X\(\/\).*/{
61372	    s//\1/
61373	    q
61374	  }
61375	  s/.*/./; q'`
61376      test -d "$as_dir" && break
61377    done
61378    test -z "$as_dirs" || eval "mkdir $as_dirs"
61379  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
61380
61381
61382} # as_fn_mkdir_p
61383if mkdir -p . 2>/dev/null; then
61384  as_mkdir_p='mkdir -p "$as_dir"'
61385else
61386  test -d ./-p && rmdir ./-p
61387  as_mkdir_p=false
61388fi
61389
61390
61391# as_fn_executable_p FILE
61392# -----------------------
61393# Test if FILE is an executable regular file.
61394as_fn_executable_p ()
61395{
61396  test -f "$1" && test -x "$1"
61397} # as_fn_executable_p
61398as_test_x='test -x'
61399as_executable_p=as_fn_executable_p
61400
61401# Sed expression to map a string onto a valid CPP name.
61402as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
61403
61404# Sed expression to map a string onto a valid variable name.
61405as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
61406
61407
61408exec 6>&1
61409## ----------------------------------- ##
61410## Main body of $CONFIG_STATUS script. ##
61411## ----------------------------------- ##
61412_ASEOF
61413test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
61414
61415cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61416# Save the log message, to keep $0 and so on meaningful, and to
61417# report actual input values of CONFIG_FILES etc. instead of their
61418# values after options handling.
61419ac_log="
61420This file was extended by OpenJDK $as_me jdk9, which was
61421generated by GNU Autoconf 2.69.  Invocation command line was
61422
61423  CONFIG_FILES    = $CONFIG_FILES
61424  CONFIG_HEADERS  = $CONFIG_HEADERS
61425  CONFIG_LINKS    = $CONFIG_LINKS
61426  CONFIG_COMMANDS = $CONFIG_COMMANDS
61427  $ $0 $@
61428
61429on `(hostname || uname -n) 2>/dev/null | sed 1q`
61430"
61431
61432_ACEOF
61433
61434case $ac_config_files in *"
61435"*) set x $ac_config_files; shift; ac_config_files=$*;;
61436esac
61437
61438
61439
61440cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61441# Files that config.status was made for.
61442config_files="$ac_config_files"
61443
61444_ACEOF
61445
61446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61447ac_cs_usage="\
61448\`$as_me' instantiates files and other configuration actions
61449from templates according to the current configuration.  Unless the files
61450and actions are specified as TAGs, all are instantiated by default.
61451
61452Usage: $0 [OPTION]... [TAG]...
61453
61454  -h, --help       print this help, then exit
61455  -V, --version    print version number and configuration settings, then exit
61456      --config     print configuration, then exit
61457  -q, --quiet, --silent
61458                   do not print progress messages
61459  -d, --debug      don't remove temporary files
61460      --recheck    update $as_me by reconfiguring in the same conditions
61461      --file=FILE[:TEMPLATE]
61462                   instantiate the configuration file FILE
61463
61464Configuration files:
61465$config_files
61466
61467Report bugs to <build-dev@openjdk.java.net>.
61468OpenJDK home page: <http://openjdk.java.net>."
61469
61470_ACEOF
61471cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61472ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
61473ac_cs_version="\\
61474OpenJDK config.status jdk9
61475configured by $0, generated by GNU Autoconf 2.69,
61476  with options \\"\$ac_cs_config\\"
61477
61478Copyright (C) 2012 Free Software Foundation, Inc.
61479This config.status script is free software; the Free Software Foundation
61480gives unlimited permission to copy, distribute and modify it."
61481
61482ac_pwd='$ac_pwd'
61483srcdir='$srcdir'
61484AWK='$AWK'
61485test -n "\$AWK" || AWK=awk
61486_ACEOF
61487
61488cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61489# The default lists apply if the user does not specify any file.
61490ac_need_defaults=:
61491while test $# != 0
61492do
61493  case $1 in
61494  --*=?*)
61495    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61496    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
61497    ac_shift=:
61498    ;;
61499  --*=)
61500    ac_option=`expr "X$1" : 'X\([^=]*\)='`
61501    ac_optarg=
61502    ac_shift=:
61503    ;;
61504  *)
61505    ac_option=$1
61506    ac_optarg=$2
61507    ac_shift=shift
61508    ;;
61509  esac
61510
61511  case $ac_option in
61512  # Handling of the options.
61513  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
61514    ac_cs_recheck=: ;;
61515  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
61516    $as_echo "$ac_cs_version"; exit ;;
61517  --config | --confi | --conf | --con | --co | --c )
61518    $as_echo "$ac_cs_config"; exit ;;
61519  --debug | --debu | --deb | --de | --d | -d )
61520    debug=: ;;
61521  --file | --fil | --fi | --f )
61522    $ac_shift
61523    case $ac_optarg in
61524    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
61525    '') as_fn_error $? "missing file argument" ;;
61526    esac
61527    as_fn_append CONFIG_FILES " '$ac_optarg'"
61528    ac_need_defaults=false;;
61529  --he | --h |  --help | --hel | -h )
61530    $as_echo "$ac_cs_usage"; exit ;;
61531  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
61532  | -silent | --silent | --silen | --sile | --sil | --si | --s)
61533    ac_cs_silent=: ;;
61534
61535  # This is an error.
61536  -*) as_fn_error $? "unrecognized option: \`$1'
61537Try \`$0 --help' for more information." ;;
61538
61539  *) as_fn_append ac_config_targets " $1"
61540     ac_need_defaults=false ;;
61541
61542  esac
61543  shift
61544done
61545
61546ac_configure_extra_args=
61547
61548if $ac_cs_silent; then
61549  exec 6>/dev/null
61550  ac_configure_extra_args="$ac_configure_extra_args --silent"
61551fi
61552
61553_ACEOF
61554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61555if \$ac_cs_recheck; then
61556  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
61557  shift
61558  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
61559  CONFIG_SHELL='$SHELL'
61560  export CONFIG_SHELL
61561  exec "\$@"
61562fi
61563
61564_ACEOF
61565cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61566exec 5>>config.log
61567{
61568  echo
61569  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
61570## Running $as_me. ##
61571_ASBOX
61572  $as_echo "$ac_log"
61573} >&5
61574
61575_ACEOF
61576cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61577_ACEOF
61578
61579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61580
61581# Handling of arguments.
61582for ac_config_target in $ac_config_targets
61583do
61584  case $ac_config_target in
61585    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
61586    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
61587    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
61588    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
61589    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
61590
61591  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
61592  esac
61593done
61594
61595
61596# If the user did not use the arguments to specify the items to instantiate,
61597# then the envvar interface is used.  Set only those that are not.
61598# We use the long form for the default assignment because of an extremely
61599# bizarre bug on SunOS 4.1.3.
61600if $ac_need_defaults; then
61601  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
61602fi
61603
61604# Have a temporary directory for convenience.  Make it in the build tree
61605# simply because there is no reason against having it here, and in addition,
61606# creating and moving files from /tmp can sometimes cause problems.
61607# Hook for its removal unless debugging.
61608# Note that there is a small window in which the directory will not be cleaned:
61609# after its creation but before its name has been assigned to `$tmp'.
61610$debug ||
61611{
61612  tmp= ac_tmp=
61613  trap 'exit_status=$?
61614  : "${ac_tmp:=$tmp}"
61615  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
61616' 0
61617  trap 'as_fn_exit 1' 1 2 13 15
61618}
61619# Create a (secure) tmp directory for tmp files.
61620
61621{
61622  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
61623  test -d "$tmp"
61624}  ||
61625{
61626  tmp=./conf$$-$RANDOM
61627  (umask 077 && mkdir "$tmp")
61628} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
61629ac_tmp=$tmp
61630
61631# Set up the scripts for CONFIG_FILES section.
61632# No need to generate them if there are no CONFIG_FILES.
61633# This happens for instance with `./config.status config.h'.
61634if test -n "$CONFIG_FILES"; then
61635
61636
61637ac_cr=`echo X | tr X '\015'`
61638# On cygwin, bash can eat \r inside `` if the user requested igncr.
61639# But we know of no other shell where ac_cr would be empty at this
61640# point, so we can use a bashism as a fallback.
61641if test "x$ac_cr" = x; then
61642  eval ac_cr=\$\'\\r\'
61643fi
61644ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
61645if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
61646  ac_cs_awk_cr='\\r'
61647else
61648  ac_cs_awk_cr=$ac_cr
61649fi
61650
61651echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
61652_ACEOF
61653
61654
61655{
61656  echo "cat >conf$$subs.awk <<_ACEOF" &&
61657  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
61658  echo "_ACEOF"
61659} >conf$$subs.sh ||
61660  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61661ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
61662ac_delim='%!_!# '
61663for ac_last_try in false false false false false :; do
61664  . ./conf$$subs.sh ||
61665    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61666
61667  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
61668  if test $ac_delim_n = $ac_delim_num; then
61669    break
61670  elif $ac_last_try; then
61671    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
61672  else
61673    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
61674  fi
61675done
61676rm -f conf$$subs.sh
61677
61678cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61679cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
61680_ACEOF
61681sed -n '
61682h
61683s/^/S["/; s/!.*/"]=/
61684p
61685g
61686s/^[^!]*!//
61687:repl
61688t repl
61689s/'"$ac_delim"'$//
61690t delim
61691:nl
61692h
61693s/\(.\{148\}\)..*/\1/
61694t more1
61695s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
61696p
61697n
61698b repl
61699:more1
61700s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61701p
61702g
61703s/.\{148\}//
61704t nl
61705:delim
61706h
61707s/\(.\{148\}\)..*/\1/
61708t more2
61709s/["\\]/\\&/g; s/^/"/; s/$/"/
61710p
61711b
61712:more2
61713s/["\\]/\\&/g; s/^/"/; s/$/"\\/
61714p
61715g
61716s/.\{148\}//
61717t delim
61718' <conf$$subs.awk | sed '
61719/^[^""]/{
61720  N
61721  s/\n//
61722}
61723' >>$CONFIG_STATUS || ac_write_fail=1
61724rm -f conf$$subs.awk
61725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61726_ACAWK
61727cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
61728  for (key in S) S_is_set[key] = 1
61729  FS = ""
61730
61731}
61732{
61733  line = $ 0
61734  nfields = split(line, field, "@")
61735  substed = 0
61736  len = length(field[1])
61737  for (i = 2; i < nfields; i++) {
61738    key = field[i]
61739    keylen = length(key)
61740    if (S_is_set[key]) {
61741      value = S[key]
61742      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
61743      len += length(value) + length(field[++i])
61744      substed = 1
61745    } else
61746      len += 1 + keylen
61747  }
61748
61749  print line
61750}
61751
61752_ACAWK
61753_ACEOF
61754cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61755if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
61756  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
61757else
61758  cat
61759fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
61760  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
61761_ACEOF
61762
61763# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
61764# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
61765# trailing colons and then remove the whole line if VPATH becomes empty
61766# (actually we leave an empty line to preserve line numbers).
61767if test "x$srcdir" = x.; then
61768  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
61769h
61770s///
61771s/^/:/
61772s/[	 ]*$/:/
61773s/:\$(srcdir):/:/g
61774s/:\${srcdir}:/:/g
61775s/:@srcdir@:/:/g
61776s/^:*//
61777s/:*$//
61778x
61779s/\(=[	 ]*\).*/\1/
61780G
61781s/\n//
61782s/^[^=]*=[	 ]*$//
61783}'
61784fi
61785
61786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61787fi # test -n "$CONFIG_FILES"
61788
61789
61790eval set X "  :F $CONFIG_FILES      "
61791shift
61792for ac_tag
61793do
61794  case $ac_tag in
61795  :[FHLC]) ac_mode=$ac_tag; continue;;
61796  esac
61797  case $ac_mode$ac_tag in
61798  :[FHL]*:*);;
61799  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
61800  :[FH]-) ac_tag=-:-;;
61801  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
61802  esac
61803  ac_save_IFS=$IFS
61804  IFS=:
61805  set x $ac_tag
61806  IFS=$ac_save_IFS
61807  shift
61808  ac_file=$1
61809  shift
61810
61811  case $ac_mode in
61812  :L) ac_source=$1;;
61813  :[FH])
61814    ac_file_inputs=
61815    for ac_f
61816    do
61817      case $ac_f in
61818      -) ac_f="$ac_tmp/stdin";;
61819      *) # Look for the file first in the build tree, then in the source tree
61820	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
61821	 # because $ac_f cannot contain `:'.
61822	 test -f "$ac_f" ||
61823	   case $ac_f in
61824	   [\\/$]*) false;;
61825	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
61826	   esac ||
61827	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
61828      esac
61829      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
61830      as_fn_append ac_file_inputs " '$ac_f'"
61831    done
61832
61833    # Let's still pretend it is `configure' which instantiates (i.e., don't
61834    # use $as_me), people would be surprised to read:
61835    #    /* config.h.  Generated by config.status.  */
61836    configure_input='Generated from '`
61837	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
61838	`' by configure.'
61839    if test x"$ac_file" != x-; then
61840      configure_input="$ac_file.  $configure_input"
61841      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
61842$as_echo "$as_me: creating $ac_file" >&6;}
61843    fi
61844    # Neutralize special characters interpreted by sed in replacement strings.
61845    case $configure_input in #(
61846    *\&* | *\|* | *\\* )
61847       ac_sed_conf_input=`$as_echo "$configure_input" |
61848       sed 's/[\\\\&|]/\\\\&/g'`;; #(
61849    *) ac_sed_conf_input=$configure_input;;
61850    esac
61851
61852    case $ac_tag in
61853    *:-:* | *:-) cat >"$ac_tmp/stdin" \
61854      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
61855    esac
61856    ;;
61857  esac
61858
61859  ac_dir=`$as_dirname -- "$ac_file" ||
61860$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
61861	 X"$ac_file" : 'X\(//\)[^/]' \| \
61862	 X"$ac_file" : 'X\(//\)$' \| \
61863	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
61864$as_echo X"$ac_file" |
61865    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
61866	    s//\1/
61867	    q
61868	  }
61869	  /^X\(\/\/\)[^/].*/{
61870	    s//\1/
61871	    q
61872	  }
61873	  /^X\(\/\/\)$/{
61874	    s//\1/
61875	    q
61876	  }
61877	  /^X\(\/\).*/{
61878	    s//\1/
61879	    q
61880	  }
61881	  s/.*/./; q'`
61882  as_dir="$ac_dir"; as_fn_mkdir_p
61883  ac_builddir=.
61884
61885case "$ac_dir" in
61886.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
61887*)
61888  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
61889  # A ".." for each directory in $ac_dir_suffix.
61890  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
61891  case $ac_top_builddir_sub in
61892  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
61893  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
61894  esac ;;
61895esac
61896ac_abs_top_builddir=$ac_pwd
61897ac_abs_builddir=$ac_pwd$ac_dir_suffix
61898# for backward compatibility:
61899ac_top_builddir=$ac_top_build_prefix
61900
61901case $srcdir in
61902  .)  # We are building in place.
61903    ac_srcdir=.
61904    ac_top_srcdir=$ac_top_builddir_sub
61905    ac_abs_top_srcdir=$ac_pwd ;;
61906  [\\/]* | ?:[\\/]* )  # Absolute name.
61907    ac_srcdir=$srcdir$ac_dir_suffix;
61908    ac_top_srcdir=$srcdir
61909    ac_abs_top_srcdir=$srcdir ;;
61910  *) # Relative name.
61911    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
61912    ac_top_srcdir=$ac_top_build_prefix$srcdir
61913    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
61914esac
61915ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
61916
61917
61918  case $ac_mode in
61919  :F)
61920  #
61921  # CONFIG_FILE
61922  #
61923
61924_ACEOF
61925
61926cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61927# If the template does not know about datarootdir, expand it.
61928# FIXME: This hack should be removed a few years after 2.60.
61929ac_datarootdir_hack=; ac_datarootdir_seen=
61930ac_sed_dataroot='
61931/datarootdir/ {
61932  p
61933  q
61934}
61935/@datadir@/p
61936/@docdir@/p
61937/@infodir@/p
61938/@localedir@/p
61939/@mandir@/p'
61940case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
61941*datarootdir*) ac_datarootdir_seen=yes;;
61942*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
61943  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
61944$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
61945_ACEOF
61946cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61947  ac_datarootdir_hack='
61948  s&@datadir@&$datadir&g
61949  s&@docdir@&$docdir&g
61950  s&@infodir@&$infodir&g
61951  s&@localedir@&$localedir&g
61952  s&@mandir@&$mandir&g
61953  s&\\\${datarootdir}&$datarootdir&g' ;;
61954esac
61955_ACEOF
61956
61957# Neutralize VPATH when `$srcdir' = `.'.
61958# Shell code in configure.ac might set extrasub.
61959# FIXME: do we really want to maintain this feature?
61960cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
61961ac_sed_extra="$ac_vpsub
61962$extrasub
61963_ACEOF
61964cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
61965:t
61966/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
61967s|@configure_input@|$ac_sed_conf_input|;t t
61968s&@top_builddir@&$ac_top_builddir_sub&;t t
61969s&@top_build_prefix@&$ac_top_build_prefix&;t t
61970s&@srcdir@&$ac_srcdir&;t t
61971s&@abs_srcdir@&$ac_abs_srcdir&;t t
61972s&@top_srcdir@&$ac_top_srcdir&;t t
61973s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
61974s&@builddir@&$ac_builddir&;t t
61975s&@abs_builddir@&$ac_abs_builddir&;t t
61976s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
61977$ac_datarootdir_hack
61978"
61979eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
61980  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61981
61982test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
61983  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
61984  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
61985      "$ac_tmp/out"`; test -z "$ac_out"; } &&
61986  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61987which seems to be undefined.  Please make sure it is defined" >&5
61988$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
61989which seems to be undefined.  Please make sure it is defined" >&2;}
61990
61991  rm -f "$ac_tmp/stdin"
61992  case $ac_file in
61993  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
61994  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
61995  esac \
61996  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
61997 ;;
61998
61999
62000
62001  esac
62002
62003done # for ac_tag
62004
62005
62006as_fn_exit 0
62007_ACEOF
62008ac_clean_files=$ac_clean_files_save
62009
62010test $ac_write_fail = 0 ||
62011  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
62012
62013
62014# configure is writing to config.log, and then calls config.status.
62015# config.status does its own redirection, appending to config.log.
62016# Unfortunately, on DOS this fails, as config.log is still kept open
62017# by configure, so config.status won't be able to write to it; its
62018# output is simply discarded.  So we exec the FD to /dev/null,
62019# effectively closing config.log, so it can be properly (re)opened and
62020# appended to by config.status.  When coming back to configure, we
62021# need to make the FD available again.
62022if test "$no_create" != yes; then
62023  ac_cs_success=:
62024  ac_config_status_args=
62025  test "$silent" = yes &&
62026    ac_config_status_args="$ac_config_status_args --quiet"
62027  exec 5>/dev/null
62028  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
62029  exec 5>>config.log
62030  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
62031  # would make configure fail if this is the last instruction.
62032  $ac_cs_success || as_fn_exit 1
62033fi
62034if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
62035  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
62036$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
62037fi
62038
62039
62040# After AC_OUTPUT, we need to do final work
62041
62042
62043  # Try to move config.log (generated by autoconf) to the configure-support directory.
62044  if test -e ./config.log; then
62045    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
62046  fi
62047
62048  # Rotate our log file (configure.log)
62049  if test -e "$OUTPUT_ROOT/configure.log.old"; then
62050    $RM -f "$OUTPUT_ROOT/configure.log.old"
62051  fi
62052  if test -e "$OUTPUT_ROOT/configure.log"; then
62053    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
62054  fi
62055
62056  # Move configure.log from current directory to the build output root
62057  if test -e ./configure.log; then
62058    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
62059  fi
62060
62061  # Make the compare script executable
62062  $CHMOD +x $OUTPUT_ROOT/compare.sh
62063
62064
62065# Finally output some useful information to the user
62066
62067  # Finally output some useful information to the user
62068
62069  printf "\n"
62070  printf "====================================================\n"
62071  if test "x$no_create" != "xyes"; then
62072    if test "x$IS_RECONFIGURE" != "xyes"; then
62073      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
62074    else
62075      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
62076    fi
62077  else
62078    if test "x$IS_RECONFIGURE" != "xyes"; then
62079      printf "A configuration has been successfully checked but not created\n"
62080    else
62081      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
62082    fi
62083  fi
62084  if test "x$CONFIGURE_COMMAND_LINE" != x; then
62085    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
62086  else
62087    printf "using default settings.\n"
62088  fi
62089
62090  printf "\n"
62091  printf "Configuration summary:\n"
62092  printf "* Debug level:    $DEBUG_LEVEL\n"
62093  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
62094  printf "* JDK variant:    $JDK_VARIANT\n"
62095  printf "* JVM variants:   $with_jvm_variants\n"
62096  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
62097  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
62098
62099  printf "\n"
62100  printf "Tools summary:\n"
62101  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
62102    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
62103  fi
62104  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
62105  if test "x$TOOLCHAIN_VERSION" != "x"; then
62106    print_version=" $TOOLCHAIN_VERSION"
62107  fi
62108  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
62109  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
62110  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
62111
62112  printf "\n"
62113  printf "Build performance summary:\n"
62114  printf "* Cores to use:   $JOBS\n"
62115  printf "* Memory limit:   $MEMORY_SIZE MB\n"
62116  if test "x$CCACHE_STATUS" != "x"; then
62117    printf "* ccache status:  $CCACHE_STATUS\n"
62118  fi
62119  printf "\n"
62120
62121  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
62122    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
62123    printf "will result in longer build times.\n"
62124    printf "\n"
62125  fi
62126
62127  if test "x$FOUND_ALT_VARIABLES" != "x"; then
62128    printf "WARNING: You have old-style ALT_ environment variables set.\n"
62129    printf "These are not respected, and will be ignored. It is recommended\n"
62130    printf "that you clean your environment. The following variables are set:\n"
62131    printf "$FOUND_ALT_VARIABLES\n"
62132    printf "\n"
62133  fi
62134
62135  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
62136    printf "WARNING: Your build output directory is not on a local disk.\n"
62137    printf "This will severely degrade build performance!\n"
62138    printf "It is recommended that you create an output directory on a local disk,\n"
62139    printf "and run the configure script again from that directory.\n"
62140    printf "\n"
62141  fi
62142
62143  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
62144    printf "WARNING: The result of this configuration has overridden an older\n"
62145    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
62146    printf "proper build. Failure to do so might result in strange build problems.\n"
62147    printf "\n"
62148  fi
62149
62150  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
62151    printf "WARNING: The result of this configuration was not saved.\n"
62152    printf "You should run without '--no-create | -n' to create the configuration.\n"
62153    printf "\n"
62154  fi
62155
62156
62157
62158  # Locate config.log.
62159  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
62160    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
62161  elif test -e "./config.log"; then
62162    CONFIG_LOG_PATH="."
62163  fi
62164
62165  if test -e "$CONFIG_LOG_PATH/config.log"; then
62166    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
62167    if test $? -eq 0; then
62168      printf "The following warnings were produced. Repeated here for convenience:\n"
62169      # We must quote sed expression (using []) to stop m4 from eating the [].
62170      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
62171      printf "\n"
62172    fi
62173  fi
62174
62175